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.

A020231 Strong pseudoprimes to base 5.

This page as a plain text file.
%I A020231 #35 Feb 16 2025 08:32:33
%S A020231 781,1541,5461,5611,7813,13021,14981,15751,24211,25351,29539,38081,
%T A020231 40501,44801,53971,79381,100651,102311,104721,112141,121463,133141,
%U A020231 141361,146611,195313,211951,216457,222301,251521,289081,290629,298271,315121
%N A020231 Strong pseudoprimes to base 5.
%H A020231 Amiram Eldar, <a href="/A020231/b020231.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..715 from R. J. Mathar)
%H A020231 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/StrongPseudoprime.html">Strong Pseudoprime</a>
%H A020231 <a href="/index/Ps#pseudoprimes">Index entries for sequences related to pseudoprimes</a>
%t A020231 nmax = 400000; 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}]]); A020231 = {}; n = 1; While[n < nmax, n = n+2; If[sppQ[n, 5] == True, Print[n]; AppendTo[A020231, n]]]; A020231 (* _Jean-François Alcover_, Oct 20 2011, after _R. J. Mathar_ *)
%Y A020231 Cf. A005936, A001262 (base-2 SPP), A020229 (base-3 SPP), A215568 (SPP to bases 2 & 5), A215566 (SPP to bases 3 & 5), A056915 (SPP to bases 2, 3 & 5), A074773 (SPP to bases 2, 3, 5 & 7).
%K A020231 nonn
%O A020231 1,1
%A A020231 _David W. Wilson_