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.
%I A020145 #39 Mar 20 2020 02:11:40 %S A020145 4,8,9,16,45,91,145,261,781,1111,1228,1305,1729,1885,2149,2821,3991, %T A020145 4005,4033,4187,4912,5365,5662,5833,6601,6697,7171,8481,8911,10585, %U A020145 11476,12403,12673,13333,13833,15805,15841,16705,19345,19729,20591,21781,22791 %N A020145 Pseudoprimes to base 17. %C A020145 Composite numbers n such that 17^(n-1) == 1 (mod n). %C A020145 According to _Karsten Meyer_, May 16 2006, the terms 4, 8, 9 and 16 should be excluded, following the strict definition in Crandall and Pomerance (p. 132) that even numbers and squares are not pseudoprimes regardless of congruence. [clarified by _Alonso del Arte_, Feb 17 2020] %D A020145 Richard Crandall and Carl Pomerance, "Prime Numbers - A Computational Perspective", Second Edition, Springer Verlag 2005, ISBN 0-387-25282-7 Page 132 (Theorem 3.4.2. and Algorithm 3.4.3). %H A020145 R. J. Mathar and T. D. Noe, <a href="/A020145/b020145.txt">Table of n, a(n) for n = 1..1000</a> (R. J. Mathar to 799 terms) %H A020145 Fred Richman, <a href="http://math.fau.edu/Richman/carm.htm">Primality testing with Fermat's little theorem</a> %H A020145 <a href="/index/Ps#pseudoprimes">Index entries for sequences related to pseudoprimes</a> %e A020145 17^3 = 4913 = 1 mod 4, so 4 is in the sequence (note the Crandall and Pomerance caveat, however). %e A020145 17^4 = 83521 = 1 mod 5, but 5 is actually prime, so it's not in the sequence. %e A020145 17^5 = 1419857 = 5 mod 6, so 6 is not in the sequence either. %t A020145 base = 17; pp17 = {}; n = 1; While[Length[pp17] < 100, n++; If[!PrimeQ[n] && PowerMod[base, n - 1, n] == 1, AppendTo[pp17, n]]]; pp17 (* _T. D. Noe_, Feb 21 2012 *) %t A020145 Select[Range[23000], !PrimeQ[#] && PowerMod[17, # - 1, #] == 1 &] (* _Harvey P. Dale_, Apr 20 2019 *) %Y A020145 Cf. A001567 (pseudoprimes to base 2). %K A020145 nonn %O A020145 1,1 %A A020145 _David W. Wilson_