OFFSET
1,6
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..12580
PROG
(PARI)
A049084(n) = if(isprime(n), primepi(n), 0); \\ This function from Charles R Greathouse IV
A249072_write_bfile(up_to_n) = { my(counts, n, a_k, a_n); counts = vector(up_to_n); a_k = 1; for(n = 1, up_to_n, a_n = A056239(a_k); write("b249072_upto12580.txt", n, " ", a_n); counts[1+a_n]++; if(1 == n, a_k = 2, a_k = counts[1+a_n])); };
A249072_write_bfile(12580);
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Oct 26 2014
STATUS
approved