OFFSET
1,2
LINKS
PROG
(PARI)
up_to = 50507;
A332807list(up_to) = { my(v=vector(up_to), p, q); v[1] = 2; v[2] = 3; v[3] = 5; for(n=4, up_to, p = v[n-2]; q = nextprime(1+p); while(q%4 != p%4, q=nextprime(1+q)); v[n] = q); apply(primepi, v); };
v332807 = A332807list(up_to);
A332807(n) = v332807[n];
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Feb 27 2020
STATUS
approved