|
|
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,
|
|
PROG
|
(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, ")
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|