OFFSET
1,2
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..10000
FORMULA
For n >= 2, a(n) = 1 + A249340(n-1).
PROG
(PARI)
allocatemem(234567890);
A049084(n) = if(isprime(n), primepi(n), 0); \\ This function from Charles R Greathouse IV
A249339_write_bfile(up_to_n) = { my(counts, n, k, a_k); counts = vector(min((2^24)-8, up_to_n^2)); n = 0; k = 0; a_k = 1; while(n < up_to_n, k++; if((0 == A056239(a_k)), n++; write("b249339.txt", n, " ", k)); counts[1+A056239(a_k)]++; a_k = counts[1+A056239(a_k)]); };
A249339_write_bfile(10000);
(Scheme, with Antti Karttunen's IntSeq-library, two alternative definitions)
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Oct 26 2014
STATUS
approved