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.

A020250 Strong pseudoprimes to base 24.

Original entry on oeis.org

25, 175, 553, 949, 1541, 1975, 2701, 4537, 6931, 7501, 13825, 21349, 25273, 25477, 29341, 38323, 42121, 42127, 47617, 49141, 52417, 63701, 80137, 83333, 85609, 94753, 105121, 113527, 128143, 144841, 167869, 169027, 179521, 181351, 197209, 201373
Offset: 1

Views

Author

Keywords

Programs

  • Mathematica
    strongPseudoprimeQ[b_, n_] := Module[{rems = Table[PowerMod[b, (n - 1)/2^expo, n], {expo, 0, IntegerExponent[n - 1, 2]}]}, (rems[[-1]] == 1 || MemberQ[rems, n - 1]) && PowerMod[b, n - 1, n] == 1]; max = 5000; Select[Complement[Range[2, max], Prime[Range[PrimePi[max]]]], strongPseudoprimeQ[24, #] &] (* Alonso del Arte, Aug 03 2018 *)
  • PARI
    is(n, a=24)= (bittest(n, 0) && !isprime(n) && n>8) || return; my(s=valuation(n-1, 2)); if(1==a=Mod(a, n)^(n>>s), return(1)); while(a!=-1 && s--, a=a^2); a==-1 \\ Felix Fröhlich, Aug 03 2018, adapted from code by M. F. Hasler in A001262