login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A129802 Possible bases for Pepin's primality test for Fermat numbers. 3

%I #13 Oct 05 2021 04:50:50

%S 3,5,6,7,10,12,14,20,24,27,28,39,40,41,45,48,51,54,56,63,65,75,78,80,

%T 82,85,90,91,96,102,105,108,112,119,125,126,130,147,150,156,160,164,

%U 170,175,180,182,192,204,210,216,224,238,243,245,250,252,260,291,294,300

%N Possible bases for Pepin's primality test for Fermat numbers.

%C Prime elements of this sequence are given by A102742.

%H Arkadiusz Wesolowski, <a href="/A129802/b129802.txt">Table of n, a(n) for n = 1..10000</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/PepinsTest.html">Pepin's Test</a>

%F A positive integer 2^k*m, where m is odd and k>=0, belongs to this sequence iff the Jacobi symbol (F_n/m)=1 only for a finite number of Fermat numbers F_n=A000215(n).

%o (PARI) { isPepin(n) = local(s,S=Set(),t); n\=2^valuation(n,2); s=Mod(3,n); while( !setsearch(S,s), S=setunion(S,[s]); s=(s-1)^2+1); t=s; until( t==s, if( kronecker(lift(t),n)==1, return(0)); t=(t-1)^2+1);1 }

%o for(n=2,1000,if(isPepin(n),print1(n,", ")))

%o (PARI) for(b=2, 300, 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, ", ")))); \\ _Arkadiusz Wesolowski_, Sep 22 2021

%Y Cf. A000215, A019434, A060377, A102742.

%K nonn

%O 1,1

%A _Max Alekseyev_, Jun 14 2007, corrected Dec 29 2007. Thanks to _Ant King_ for pointing out an error in the earlier version of this sequence.

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 03:46 EDT 2024. Contains 371782 sequences. (Running on oeis4.)