Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A113050
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A113050 a(1) = a(2) = 1; for n>2, a(n+1) = a(n) + a(n-1) iff n is prime, else a(n+1) = a(n) + 1. +0
4
1, 1, 2, 3, 4, 7, 8, 15, 16, 17, 18, 35, 36, 71, 72, 73, 74, 147, 148, 295, 296, 297, 298, 595, 596, 597, 598, 599, 600, 1199, 1200, 2399, 2400, 2401, 2402, 2403, 2404, 4807, 4808, 4809, 4810, 9619, 9620, 19239, 19240, 19241, 19242, 38483, 38484, 38485 (list; graph; listen)
OFFSET

1,3

COMMENT

A sequence which is locally Fibonacci at prime indices.

a(n) is prime for n = 3, 4, 6, 10, 14, 16, ... a(n) is a nontrivial perfect power for a(7) = 8, a(13) = 36, a(28) = 529, ...

EXAMPLE

a(3) = 2 because 3-1 = 2 is prime, hence a(3) = a(2) + a(1) = 1 + 1 = 2.

a(4) = 3 because 4-1 = 3 is prime, hence a(4) = a(3) + a(2) = 2 + 1 = 3.

a(5) = 4 because 5-1 = 4 is not prime, hence a(5) = a(4) + 1 = 3 + 1 = 4.

a(6) = 7 because 6-1 = 5 is prime, hence a(6) = a(5) + a(4) = 4 + 3 = 7.

a(7) = 8 because 7-1 = 6 is not prime, hence a(7) = a(6) + 1 = 7 + 1 = 8.

a(8) = 15 because 8-1 = 7 is prime, hence a(8) = a(7) + a(6) = 8 + 7 = 15.

MATHEMATICA

a[1] = a[2] = 1; a[n_] := a[n] = If[ PrimeQ[n - 1], a[n - 1] + a[n - 2], a[n - 1] + 1]; Table[ a[n], {n, 50}] (* Robert G. Wilson v *)

CROSSREFS

Cf. A000040, A000045, A113051.

Sequence in context: A057887 A006049 A084541 this_sequence A097110 A116961 A120611

Adjacent sequences: A113047 A113048 A113049 this_sequence A113051 A113052 A113053

KEYWORD

easy,nonn

AUTHOR

Jonathan Vos Post (jvospost3(AT)gmail.com), Oct 12 2005

EXTENSIONS

Corrected and extended by Robert G. Wilson v (rgwv(at)rgwv.com), Oct 14 2005

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified December 11 12:57 EST 2009. Contains 170656 sequences.


AT&T Labs Research