OFFSET
1,2
LINKS
FORMULA
PROG
(PARI)
allocatemem(234567890);
default(primelimit, 2^22);
A014580 = vector(2^18);
A091226 = vector(2^22);
A091242 = vector(2^22);
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++; A014580[i] = n; A091226[n] = A091226[n-1]+1, j++; A091242[j] = n; A091226[n] = A091226[n-1]); n++);
A245703(n) = if(1==n, 1, if(isprime(n), A014580[A245703(primepi(n))], A091242[A245703(n-primepi(n)-1)]));
A245704(n) = if(1==n, 1, if(isA014580(n), prime(A245704(A091226[n])), A002808(A245704(A091245(n)))));
A057889(n) = if(n<1, 0, 2^valuation(n, 2) * subst(Polrev(binary(n / 2^valuation(n, 2))), x, 2));
for(n=1, 10080, write("b245450.txt", n, " ", A245450(n)));
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Aug 07 2014
STATUS
approved