login
This site is supported by donations to The OEIS Foundation.

 

Logo

Please make a donation to keep the OEIS running. We are now in our 55th year. In the past year we added 12000 new sequences and reached 8000 citations (which often say "discovered thanks to the OEIS"). We need to raise money to hire someone to manage submissions, which would reduce the load on our editors and speed up editing.
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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. 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; refs; listen; history; text; internal format)
OFFSET

1,3

COMMENTS

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, ...

LINKS

Ivan Neretin, Table of n, a(n) for n = 1..1000

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: A006049 A084541 A240690 * A278180 A015927 A097110

Adjacent sequences:  A113047 A113048 A113049 * A113051 A113052 A113053

KEYWORD

easy,nonn

AUTHOR

Jonathan Vos Post, Oct 12 2005

EXTENSIONS

Corrected and extended by Robert G. Wilson v, Oct 14 2005

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified December 5 16:12 EST 2019. Contains 329753 sequences. (Running on oeis4.)