OFFSET
1,2
LINKS
FORMULA
PROG
(PARI)
allocatemem(123456789);
default(primelimit, 2^22)
v014580 = vector(2^18); A014580(n) = v014580[n];
v091226 = vector(2^22); A091226(n) = v091226[n];
A002808(n)={ my(k=-1); while( -n + n += -k + k=primepi(n), ); n}; \\ This function from M. F. Hasler
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++; v014580[i] = n; v091226[n] = v091226[n-1]+1, v091226[n] = v091226[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("b245822.txt", n, " ", A245822(n)));
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Aug 02 2014
STATUS
approved