OFFSET
1,1
COMMENTS
Suppose n is composite. Then if n = 1 mod 8, it is in the sequence if 2^((n-1)/4) = 1 or -1 mod n; if n = 3 or 5 mod 8, it is in the sequence if 2^((n-1)/2) = -1 mod n; and if n = 3 mod 8, it is in the sequence if 2^((n-1)/2) = 1 mod n.
a(1) = 1729 is the Hardy-Ramanujan number. - Omar E. Pol, Jun 05 2017
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
PROG
(Perl) use Math::Prime::Util ':all'
foroddcomposites { print "$_, " if is_euler_plumb_pseudoprime($_); } 9, 999999;
(PARI) is(n)=if(n<2 || isprime(n) || n%2==0, return(0)); my(n8=n%8, e=n>>((n8==1)+1), t=Mod(2, n)^e); if(t==1, n8==1 || n8==7, if(t==-1, n8==1 || n8==3 || n8==5, 0))
CROSSREFS
KEYWORD
nonn
AUTHOR
Charles R Greathouse IV, Jun 05 2017
STATUS
approved