OFFSET
1,1
LINKS
R. D. Carmichael, Fermat numbers F(n) = 2^(2^n) + 1, Amer. J. Math., 26 (1919), 137-146.
Eric Weisstein's World of Mathematics, Pepin's Test
FORMULA
A positive integer b belongs to this sequence if and only if the Jacobi symbol J(b,F(m)) has value 0 or 1 for some 5 < F(m) < b, and J(b,F(m)) = 1 only for a finite number of Fermat numbers F(m) = 2^(2^m) + 1.
PROG
(PARI) for(b=18, 1785, a=q=0; until(b-2<16^(2^a), a++; if(!(kronecker(b, 16^(2^(a-1))+1)==-1), q=1; break)); if(q==1, k=b/2^valuation(b, 2); if(k>1, i=logint(k, 2); m=Mod(2, k); z=znorder(m); e=znorder(Mod(2, z/2^valuation(z, 2))); t=0; for(c=1, e, if(kronecker(lift(m^2^(i+c))+1, k)==-1, t++, break)); if(t==e, print1(b, ", ")))));
CROSSREFS
KEYWORD
nonn
AUTHOR
Arkadiusz Wesolowski, Jan 29 2022
STATUS
approved