OFFSET
1,4
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..10000
PROG
(PARI)
A049084(n) = if(isprime(n), primepi(n), 0); \\ This function from Charles R Greathouse IV
A249147_write_bfile(up_to_n) = { my(pfcounts, n, a_n, x_n, f, k); pfcounts = vector(up_to_n); x_n = 1; for(n = 0, up_to_n, if((1 == x_n), pfcounts[1]++; x_n = pfcounts[1]; a_n = 0, f=factor(x_n); for(i=1, #f~, k = A049084(f[i, 1])+1; pfcounts[k] += f[i, 2]); a_n = A049084(f[1, 1]); x_n = pfcounts[a_n+1]); if(n>0, write("b249147.txt", n, " ", a_n))); };
A249147_write_bfile(10000);
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Oct 24 2014
STATUS
approved