login
Pseudoprimes to base 39.
1

%I #26 Apr 01 2017 07:56:29

%S 38,95,133,341,1561,1834,1891,2047,2101,2465,3053,3439,3805,4141,4237,

%T 4411,5662,5921,6533,6601,6697,8149,8321,8911,10381,10585,12403,12431,

%U 13889,13981,15841,16297,16441,16589,17081,20567,22681,23521,26885,28153

%N Pseudoprimes to base 39.

%C Composite numbers n such that 39^(n-1) == 1 (mod n).

%H T. D. Noe, <a href="/A020167/b020167.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 Since 39^n = 1 mod 38 as long as n is a nonzero integer, 38 is in the sequence trivially.

%e Obviously 39 = 39 mod 95. But 39^2 = 1521 = 16 * 95 + 1, which means that 39^n = 1 mod 95 whenever n is even, and since 95 - 1 is even, 95 is in the sequence.

%p select(n -> 39 &^ (n-1) mod n = 1 and not isprime(n), [$2..10^5]); # _Robert Israel_, Mar 24 2017

%t max = 3000; Select[Complement[Range[max], Prime[Range[PrimePi[max]]]], PowerMod[39, # - 1, #] == 1 &] (* _Alonso del Arte_, Mar 12 2017 *)

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

%K nonn

%O 1,1

%A _David W. Wilson_