login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Pseudoprimes to base 2 of the form 4k+1.
2

%I #15 Sep 10 2019 04:52:25

%S 341,561,645,1105,1729,1905,2465,2701,2821,3277,4033,4369,4681,5461,

%T 6601,7957,8321,8481,10261,10585,11305,12801,13741,13981,15709,15841,

%U 16705,18705,18721,23001,23377,25761,29341,30121,30889,31417,31609,31621,33153,34945,35333,39865,41041,41665,46657,49141,49981,52633

%N Pseudoprimes to base 2 of the form 4k+1.

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

%t Select[4 * Range[10^4] + 1, CompositeQ[#] && PowerMod[2, # - 1, #] == 1 &] (* _Amiram Eldar_, Sep 10 2019 *)

%o (PARI) forstep(n=5, 10^7, 4, if(isprime(n), next()); if(Mod(2, n)^(n-1)==1, print1(n, ", ")))

%Y Cf. A001567, A177884.

%K nonn

%O 1,1

%A _Joerg Arndt_, Dec 30 2010