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!)
A181781 Numbers n that are Euler pseudoprimes to some base b, 2 <= b <= n-2. 3

%I #33 Nov 03 2019 11:56:33

%S 21,25,33,45,49,57,65,69,77,85,91,93,105,117,121,125,129,133,141,145,

%T 153,161,165,169,175,177,185,189,201,205,209,213,217,221,225,231,237,

%U 245,247,249,253,259,261,265,273,285,289,297,301,305,309,321,325,329,333,341,343,345

%N Numbers n that are Euler pseudoprimes to some base b, 2 <= b <= n-2.

%H Amiram Eldar, <a href="/A181781/b181781.txt">Table of n, a(n) for n = 1..10000</a>

%H Karsten Meyer, <a href="http://de.wikibooks.org/wiki/Pseudoprimzahlen:_Tabelle_Pseudoprimzahlen_%2815_-_4999%29">Tabelle Pseudoprimzahlen (15-4999)</a>

%H Karsten Meyer, <a href="/A181781/a181781.txt">Rexx program</a>

%H Eric W. Weisstein, <a href="http://mathworld.wolfram.com/EulerPseudoprime.html">MathWorld: Euler Pseudoprime</a>

%p isEulPSP := proc(n,b) if isprime(n) then false; else m := modp(b &^ ((n-1)/2),n) ; if m= 1 or m = n-1 then true; else false; end if; end if;end proc:

%p isA181781 := proc(n) for b from 2 to n-2 do if isEulPSP(n,b) then return true; end if; end do: return false;end proc:

%p for n from 3 to 800 do if isA181781(n) then printf("%d,",n) ; end if; end do: # _R. J. Mathar_, May 30 2011

%t fQ[n_?PrimeQ, b_] = False; fQ[n_, b_] := Block[{p = PowerMod[b, (n - 1)/2, n]}, p == Mod[1, n] || p == Mod[-1, n]]; gQ[n_] := AnyTrue[Range[2, n - 2], fQ[n, #] &]; Select[2 Range[172] + 1, gQ] (* _Michael De Vlieger_, Sep 09 2015, after _Jean-François Alcover_ at A006970, Version 10 *)

%o (See Rexx program in Links.)

%Y Cf. A006970, A181780.

%K nonn

%O 1,1

%A _Karsten Meyer_, Nov 12 2010

%E Definition corrected by _Max Alekseyev_, Nov 12 2010

%E Edited definition to be consistent with OEIS style. - _N. J. A. Sloane_, Nov 13 2010

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 24 04:14 EDT 2024. Contains 371918 sequences. (Running on oeis4.)