OFFSET
1,2
LINKS
FORMULA
PROG
(PARI)
allocatemem(123456789);
v014580 = vector(2^18);
v091226 = vector(2^22);
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, j++; v091226[n] = v091226[n-1]); n++);
A002808(n)={my(k); for(k=0, primepi(n), isprime(n++)&&k--); n}; \\ This function from M. F. Hasler
A014580(n) = v014580[n];
A091226(n) = v091226[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))}));
for(n=1, 10001, write("b245814.txt", n, " ", A245814(n)));
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Aug 16 2014
STATUS
approved