login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A178958 Numbers n from A181780 that are not in A181781. 0

%I

%S 15,28,35,39,51,52,55,63,66,70,75,76,87,95,99,111,112,115,119,123,124,

%T 130,135,143,147,148,154,155,159,171,172,176,183,186,187,190,195,196,

%U 203,207,208,215,219,232,235,238,244,246,255,267,268,275,276,279,280,286,287,291,292,295,299

%N Numbers n from A181780 that are not in A181781.

%C Numbers that are Fermat pseudoprimes to some base a (2<=a<=n-2) not Euler pseudoprimes to any base a (2<=a<=n-2).

%e 4^(15-1) == 1 (mod 15), but 4^((15-1)/2) == 4 (mod 15)

%o (PARI)

%o fsp(n)=

%o { /* whether n is Fermat pseudoprime to any base a where 2<=a<=n-2 */

%o for (a=2,n-2,

%o if ( gcd(a,n)!=1, next() );

%o if ( (Mod(a,n))^(n-1)==+1, return(1) )

%o );

%o return(0);

%o }

%o esp(n)=

%o { /* whether n is Euler pseudoprime to any base a where 2<=a<=n-2 */

%o local(w);

%o if ( n%2==0, return(0) );

%o for (a=2,n-2,

%o if ( gcd(a,n)!=1, next() );

%o w = abs(component((Mod(a,n))^((n-1)/2),2));

%o if ( (w==1) || (w==n-1), return(1) )

%o );

%o return(0);

%o }

%o for(n=3,300, if(isprime(n),next()); if( fsp(n) && (!esp(n)) , print1(n,", ") ); );

%Y A181780

%K nonn

%O 1,1

%A _Karsten Meyer_, Dec 31 2010

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 28 10:48 EDT 2021. Contains 347714 sequences. (Running on oeis4.)