login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A142884 a(n) = 1 if a(n-1) is prime, else a(n) = a(n-2)+a(n-3); starting with a(0) = 0, a(1) = a(2) = 1. 1
0, 1, 1, 1, 2, 1, 3, 1, 4, 4, 5, 1, 9, 6, 10, 15, 16, 25, 31, 1, 56, 32, 57, 88, 89, 1, 177, 90, 178, 267, 268, 445, 535, 713, 980, 1248, 1693, 1, 2941, 1694, 2942, 4635, 4636, 7577, 1, 12213, 7578, 12214, 19791, 19792, 32005, 39583, 51797, 1, 91380, 51798, 91381, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,5
COMMENTS
Original title: "Prime finding sequence recursion where the primes are sums of two integers".
LINKS
EXAMPLE
15 + 16 = 31,
32 + 57 = 89,
713 + 980 = 1693,
19792 + 32005 = 51797,
237122034 + 314186695 = 551308729.
MATHEMATICA
Clear[a, n]; a[0] = 0; a[1] = 1; a[2] = 1; a[n_] := a[n] = If[PrimeQ[a[n - 1]], 1, a[n - 2] + a[n - 3]]; Table[a[n], {n, 0, 100}]
CROSSREFS
Sequence in context: A278575 A333879 A175126 * A347028 A325365 A177687
KEYWORD
nonn,less
AUTHOR
Roger L. Bagula, Sep 28 2008
EXTENSIONS
Edited by M. F. Hasler, Feb 09 2014
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 12 15:05 EDT 2024. Contains 372482 sequences. (Running on oeis4.)