OFFSET
1,1
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..19962
PROG
(PARI)
up_to = 10000;
A332806list(up_to) = { my(v=vector(2), xs=Map(), lista=List([]), p, q, u); v[2] = 3; v[1] = 5; mapput(xs, 1, 1); mapput(xs, 2, 2); mapput(xs, 3, 3); for(n=4, up_to, p = v[2-(n%2)]; q = nextprime(1+p); while(q%4 != p%4, q=nextprime(1+q)); v[2-(n%2)] = q; mapput(xs, primepi(q), n)); for(i=1, oo, if(!mapisdefined(xs, i, &u), return(Vec(lista)), listput(lista, prime(u)))); };
v332806 = A332806list(up_to);
A332806(n) = v332806[n];
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Feb 27 2020
STATUS
approved