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 A020229 #45 Feb 16 2025 08:32:33 %S A020229 121,703,1891,3281,8401,8911,10585,12403,16531,18721,19345,23521, %T A020229 31621,44287,47197,55969,63139,74593,79003,82513,87913,88573,97567, %U A020229 105163,111361,112141,148417,152551,182527,188191,211411,218791,221761,226801 %N A020229 Strong pseudoprimes to base 3. %H A020229 Charles R Greathouse IV, <a href="/A020229/b020229.txt">Table of n, a(n) for n = 1..24767</a> (first 752 terms from R. J. Mathar) %H A020229 Joerg Arndt, <a href="http://www.jjj.de/fxt/#fxtbook">Matters Computational (The Fxtbook)</a>, section 39.10, pp. 786-792 %H A020229 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/StrongPseudoprime.html">Strong Pseudoprime</a> %H A020229 <a href="/index/Ps#pseudoprimes">Index entries for sequences related to pseudoprimes</a> %t A020229 sppQ[n_?EvenQ, _] := False; sppQ[n_?PrimeQ, _] := False; sppQ[n_, b_] := (s = IntegerExponent[n-1, 2]; d = (n-1)/2^s; If[PowerMod[b, d, n] == 1, Return[True], Do[If[PowerMod[b, d*2^r, n] == n-1, Return[True]], {r, 0, s-1}]]); A020229 = {}; lst = {}; k = 3; While[k < 500000, If[sppQ[k, 3], Print[k]; AppendTo[lst, k]]; k += 2]; lst (* _Jean-François Alcover_, Oct 20 2011, after _R. J. Mathar_ *) %o A020229 (PARI) is_A020229(n,b=3)={ bittest(n,0) || return;ispseudoprime(n) && return;my(d=(n-1)>>valuation(n-1,2));Mod(b,n)^d==1 || until(n-1<=d*=2,Mod(b,n)^d+1 || return(1))} \\ _M. F. Hasler_, Jul 19 2012 %Y A020229 Cf. A001262, A072276, A056915, A074773, A005935. %K A020229 nonn %O A020229 1,1 %A A020229 _David W. Wilson_