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

%I #9 Feb 10 2014 09:17:40

%S 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,

%T 178,267,268,445,535,713,980,1248,1693,1,2941,1694,2942,4635,4636,

%U 7577,1,12213,7578,12214,19791,19792,32005,39583,51797,1,91380,51798,91381,1

%N 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.

%C Original title: "Prime finding sequence recursion where the primes are sums of two integers".

%H Vincenzo Librandi, <a href="/A142884/b142884.txt">Table of n, a(n) for n = 0..1000</a>

%e 15 + 16 = 31,

%e 32 + 57 = 89,

%e 713 + 980 = 1693,

%e 19792 + 32005 = 51797,

%e 237122034 + 314186695 = 551308729.

%t 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}]

%K nonn,less

%O 0,5

%A _Roger L. Bagula_, Sep 28 2008

%E Edited by _M. F. Hasler_, Feb 09 2014

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 September 8 15:42 EDT 2024. Contains 375753 sequences. (Running on oeis4.)