login
Pseudoprimes to base 20.
1

%I #26 Feb 22 2020 10:36:15

%S 21,57,133,231,399,561,671,861,889,1281,1653,1729,1891,2059,2413,2501,

%T 2761,2821,2947,3059,3201,4047,5271,5461,5473,5713,5833,6601,6817,

%U 7999,8421,8911,11229,11557,11837,12801,13051,13981,14091,15251,15311,15841

%N Pseudoprimes to base 20.

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

%H T. D. Noe, <a href="/A020148/b020148.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>

%e 20^20 = 104857600000000000000000000 == 1 (mod 21), so 21 is in the sequence.

%e 20^22 = 41943040000000000000000000000 == 1 (mod 23), but 23 is actually prime, so it's not in the sequence.

%e 20^24 = 16777216000000000000000000000000 == 0 (mod 25), so 25 is not in the sequence either.

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

%t searchMax = 10000; Complement[Select[Range[searchMax], PowerMod[20, # - 1, #] == 1 &], Prime[Range[PrimePi[searchMax]]]] (* _Alonso del Arte_, Feb 20 2020 *)

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

%K nonn

%O 1,1

%A _David W. Wilson_