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!)
A259622 Primeth recurrence: a(n) = (a(n-1)+a(n-2))-th prime, with a(0)=0, a(1)=1 1
0, 1, 2, 5, 17, 79, 503, 4243, 45823, 612809, 9903031, 189244327, 4203344543, 106963067069, 3081230793857, 99460155441599, 3566360917197283, 140987300677114811, 6104597616658111069, 287835273618906460259 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
MATHEMATICA
RecurrenceTable[{a[n] == Prime[a[n - 1] + a[n - 2]], a[0] == 0,
a[1] == 1}, a, {n, 0, 14}] (* Michael De Vlieger, Jul 01 2015 *)
PROG
(PARI) a(n)=if(n<3, n, prime(a(n-1)+a(n-2))) \\ Charles R Greathouse IV, Jul 13 2015
(PARI) main(size)={my(v=vector(size), i); v[1]=0; v[2]=1; for(i=3, size, v[i]=prime(v[i-1]+v[i-2])); return(v); } /* Anders Hellström, Jul 13 2015 */
(Perl) use bignum;
use Math::Prime::Util ':all';
$|=1;
my $a=0, $b=1;
while(1){
($a, $b)=($b, nth_prime($a+$b));
print("$b, ")
} # Charles R Greathouse IV, Jul 13 2015
CROSSREFS
Sequence in context: A302194 A289739 A243337 * A054499 A001186 A125282
KEYWORD
nonn
AUTHOR
EXTENSIONS
a(7)-a(14) from Michael De Vlieger, Jul 01 2015
a(15)-a(18) from Charles R Greathouse IV, Jul 13 2015
a(19) from Charles R Greathouse IV, Jul 14 2015
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 February 25 04:28 EST 2024. Contains 370309 sequences. (Running on oeis4.)