%I #26 Feb 23 2023 11:36:21
%S 0,0,0,7,23,66,187,485,1272,3270,8139,20015,50090,125284,318729,
%T 813380,2104139,5514763,14627441
%N Number of Fermat pseudoprimes to bases 2 and 3 less than 10^n.
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/FermatPseudoprime.html">Fermat Pseudoprime</a>.
%H <a href="/index/Ps#pseudoprimes">Index entries for sequences related to pseudoprimes</a>.
%t Table[Count[Select[Range[2, 10^6], ! PrimeQ[#] && PowerMod[2, # - 1, #] == 1 && PowerMod[3, # - 1, #] == 1 &], x_ /; x < 10^n], {n, 6}] (* _Robert Price_, Jun 09 2019 *)
%o (PARI) my(n=1, i=0); forcomposite(k=1, 1e20, if(Mod(2, k)^(k-1)==1 && Mod(3, k)^(k-1)==1, i++); if(k==10^n, print1(i, ", "); n++)) \\ _Felix Fröhlich_, Oct 11 2015
%Y Cf. A052155.
%K nonn,more
%O 1,4
%A _Eric W. Weisstein_, Nov 18 2005
%E a(9) from _Felix Fröhlich_, Oct 11 2015
%E a(10)-a(11) from _Amiram Eldar_, Sep 18 2021
%E a(12)-a(19) from _Amiram Eldar_, Apr 22 2022
|