login
Strong pseudoprimes to base 64.
1

%I #15 Aug 08 2018 04:32:00

%S 9,21,63,65,133,231,341,481,511,651,1387,1417,1541,1661,2047,2501,

%T 3171,3277,3641,4033,4097,4371,4681,5461,5963,6533,6951,7107,7161,

%U 8321,8911,9709,10261,11041,13333,13747,14491,14981,15709,15841,16589,19561,19951

%N Strong pseudoprimes to base 64.

%H R. J. Mathar, <a href="/A020290/b020290.txt">Table of n, a(n) for n = 1..300</a>

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

%t strongPseudoprimeQ[b_, n_] := Module[{rems = Table[PowerMod[b, (n - 1)/2^expo, n], {expo, 0, IntegerExponent[n - 1, 2]}]}, (rems[[-1]] == 1 || MemberQ[rems, n - 1]) && PowerMod[b, n - 1, n] == 1]; max = 5000; Select[Complement[Range[2, max], Prime[Range[PrimePi[max]]]], strongPseudoprimeQ[64, #] &] (* _Alonso del Arte_, Aug 08 2018 *)

%K nonn

%O 1,1

%A _David W. Wilson_