cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A086249 Number of base-2 Fermat pseudoprimes x that have ord(2,x) = n.

This page as a plain text file.
%I A086249 #12 Feb 16 2025 08:32:50
%S A086249 0,0,0,0,0,0,0,0,0,1,1,0,0,1,1,1,0,1,0,1,1,3,1,2,1,1,0,12,4,3,0,1,1,1,
%T A086249 1,12,1,1,4,5,1,9,4,10,8,3,4,25,0,10,11,11,4,1,4,15,4,22,1,57,0,1,4,
%U A086249 10,1,24,1,11,1,41,4,86,4,10,25,11,0,21,4,7,4,10,1,52,1,7,10,22,0,26,11,56,1
%N A086249 Number of base-2 Fermat pseudoprimes x that have ord(2,x) = n.
%C A086249 A base-2 Fermat pseudoprime is a composite number x such that 2^x == 2 (mod x). For such an x, ord(2,x) is the smallest positive integer m such that 2^m == 1 (mod x). For a number x to have order n, it must be a factor of 2^n-1 and not be a factor of 2^r-1 for r<n. Sequence A086250 lists the smallest pseudoprime of order n.
%C A086249 Note that there is no pseudoprime of order n when 2^n-1 is prime. However that does not explain why there are none for 12, 27, 49 and 77.
%H A086249 Max Alekseyev, <a href="/A086249/b086249.txt">Table of n, a(n) for n = 1..200</a>
%H A086249 R. G. E. Pinch, <a href="ftp://ftp.dpmms.cam.ac.uk/pub/PSP/">Pseudoprimes and their factors (FTP)</a>
%H A086249 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/Pseudoprime.html">Pseudoprime</a>
%e A086249 a(10) = 1 there is only 1 pseudoprime, 341 = 11*31, having order 10; that is, 2^10 = 1 mod 341.
%t A086249 Table[d=Divisors[2^n-1]; cnt=0; Do[m=d[[i]]; If[ !PrimeQ[m]&&PowerMod[2, m, m]==2&&MultiplicativeOrder[2, m]==n, cnt++ ], {i, Length[d]}]; cnt, {n, 100}]
%o A086249 (PARI) { a(n) = my(r=0); fordiv(2^n-1,d, if(d>1 && (d-1)%n==0 && !ispseudoprime(d) && znorder(Mod(2,d),n)==n,r++) ); r } /* _Max Alekseyev_, Jan 07 2015 */
%Y A086249 Cf. A001567 (base-2 pseudoprimes), A086250.
%K A086249 hard,nonn
%O A086249 1,22
%A A086249 _T. D. Noe_, Jul 14 2003