login
Pseudoprimes to base 32.
3

%I #25 Sep 27 2024 15:57:16

%S 25,33,93,165,205,217,325,341,385,425,465,561,645,697,793,825,1023,

%T 1025,1045,1057,1065,1105,1353,1387,1525,1705,1729,1905,2047,2317,

%U 2325,2465,2665,2701,2761,2821,3053,3157,3277,3565,3813,4033,4123,4141,4369,4371

%N Pseudoprimes to base 32.

%C Composite numbers n such that 32^(n-1) == 1 (mod n). - _Michel Lagneau_, Feb 18 2012

%H T. D. Noe, <a href="/A020160/b020160.txt">Table of n, a(n) for n = 1..1000</a>

%H <a href="/index/Ps#pseudoprimes">Index entries for sequences related to pseudoprimes</a>

%t pseudos32 = {}; n = 1; While[Length[pseudos32] < 100, n++; If[!PrimeQ[n] && PowerMod[32, n - 1, n] == 1, AppendTo[pseudos32, n]]]; pseudos32 (* _T. D. Noe_, Feb 21 2012 *)

%t max = 5000; Complement[Select[Range[max], PowerMod[32, # - 1, #] == 1 &], Prime[Range[PrimePi[max]]]] (* _Alonso del Arte_, Jun 12 2018 *)

%t Select[Range[5000],CompositeQ[#]&&PowerMod[32,#-1,#]==1&] (* _Harvey P. Dale_, Sep 27 2024 *)

%o (Magma) [n: n in [3..10000 by 2] | IsOne(Modexp(32, n-1, n)) and not IsPrime(n)]; // _Vincenzo Librandi_, Jun 13 2018

%Y Cf. A001567 (pseudoprimes to base 2).

%K nonn

%O 1,1

%A _David W. Wilson_