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.

A047935 Consider primes p with least positive primitive root g such that q=p+g is next prime after p; sequence gives values of g.

Original entry on oeis.org

1, 2, 2, 2, 2, 2, 2, 2, 2, 6, 2, 2, 2, 6, 2, 6, 10, 2, 6, 2, 2, 2, 6, 2, 2, 6, 6, 2, 10, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 6, 6, 2, 6, 2, 6, 6, 2, 6, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 6, 2, 2, 10, 2, 2, 2, 2, 6, 2, 6, 2, 2, 2, 2, 6, 2, 2, 2, 2, 10, 6, 10, 2, 2, 2, 10, 2, 2, 2, 6, 10
Offset: 1

Views

Author

Keywords

Examples

			11 has primitive root 2 and 11+2 = 13 is prime after 11, which contributes a 2 to the sequence.
		

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 864.

Crossrefs

Cf. A047933, A047934. See also A001918.

Programs

  • Mathematica
    f[p_] := {g = PrimitiveRoot[p], p + g == NextPrime[p]};
    A047935 = Select[f /@ Prime /@ Range[1000], #[[2]]& ][[All, 1]](* Jean-François Alcover, Feb 15 2012 *)

Extensions

More terms from James Sellers, Dec 22 1999