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.

A237266 The n-th base 2 pseudoprime is also a pseudoprime to base 2 through base prime(a(n)).

Original entry on oeis.org

1, 1, 1, 2, 1, 3, 1, 1, 2, 2, 3, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 3, 1, 2, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 2, 1, 1, 1, 1, 5, 1, 1, 1, 1, 2, 1, 1, 1, 1, 3, 1, 1, 5, 2, 1, 3, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 4, 1, 2, 2, 1, 1, 1, 2, 2, 1, 2, 3, 2, 2, 1, 5, 1, 1, 3, 1
Offset: 1

Views

Author

Lei Zhou, Feb 05 2014

Keywords

Comments

Pseudoprime A001567(n) is a pseudoprime to base 2 through base prime(a(n)), where a(n) is this sequence.

Examples

			n=1, A001567[1]=341. 341 is base 2 pseudoprime but not base 3 pesudoprime.  Since Prime(1)=2, a(1)=1;
...
n=6, A001567[1]=1729. 1729 is base 2, 3, 5 pseudoprimes but not base 7 pesudoprime.  Since Prime(3)=5, a(6)=5.
		

Crossrefs

Programs

  • Mathematica
    p = 1; fi = {}; While[Length[fi] < 87, p = p + 2; If[! PrimeQ[p], ct = 0; q = 2; While[c = q^(p - 1); Mod[c, p] == 1, q = NextPrime[q]]; If[q > 2, q = PrimePi[NextPrime[q, -1]]; AppendTo[fi, q]]]]; Print[fi]