OFFSET
1,2
COMMENTS
LINKS
FORMULA
PROG
(PARI)
allocatemem(123456789);
default(primelimit, 2^22)
A014580 = vector(2^18);
A091226 = vector(2^22);
A002808(n)={my(k); for(k=0, primepi(n), isprime(n++)&&k--); n}; \\ This function from M. F. Hasler, Oct 31 2008
A062298(n) = n-primepi(n);
isA014580(n)=polisirreducible(Pol(binary(n))*Mod(1, 2)); \\ This function from Charles R Greathouse IV
i=0; j=0; n=2; while((n < 2^22), if(isA014580(n), i++; A014580[i] = n; A091226[n] = A091226[n-1]+1, A091226[n] = A091226[n-1]); n++)
A091204(n) = if(n<=1, n, if(isprime(n), A014580[A091204(primepi(n))], {my(pfs, t, bits, i); pfs=factor(n); pfs[, 1]=apply(t->Pol(binary(A091204(t))), pfs[, 1]); sum(i=1, #bits=Vec(factorback(pfs))%2, bits[i]<<(#bits-i))}));
A245704(n) = if(1==n, 1, if(isA014580(n), prime(A245704(A091226[n])), A002808(A245704(A091245(n)))));
for(n=1, 10001, write("b245816.txt", n, " ", A245816(n)));
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Aug 02 2014
STATUS
approved