OFFSET
1,2
COMMENTS
LINKS
FORMULA
PROG
(PARI)
allocatemem(234567890);
v014580 = vector(2^18);
v091226 = vector(2^22);
v091242 = 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++; v091242[j] = n; 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
A062298(n) = n-primepi(n);
A014580(n) = v014580[n];
A091226(n) = v091226[n];
A091242(n) = v091242[n];
A091205(n) = if(n<=1, n, if(isA014580(n), prime(A091205(A091226(n))), {my(irfs, t); irfs=subst(lift(factor(Mod(1, 2)*Pol(binary(n)))), x, 2); irfs[, 1]=apply(t->A091205(t), irfs[, 1]); factorback(irfs)}));
A245703(n) = if(1==n, 1, if(isprime(n), A014580(A245703(primepi(n))), A091242(A245703(n-primepi(n)-1))));
for(n=1, 10001, write("b245815.txt", n, " ", A245815(n)));
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Aug 02 2014
STATUS
approved