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.

A223705 Least number k such that prime(n) is the largest divisor of k^2 + 1, or 0 if there is no such k.

Original entry on oeis.org

1, 0, 2, 0, 0, 5, 4, 0, 0, 12, 0, 6, 9, 0, 0, 23, 0, 11, 0, 0, 27, 0, 0, 34, 22, 10, 0, 0, 33, 15, 0, 0, 37, 0, 44, 0, 28, 0, 0, 80, 0, 19, 0, 81, 14, 0, 0, 0, 0, 107, 89, 0, 64, 0, 16, 0, 82, 0, 60, 53, 0, 138, 0, 0, 25, 114, 0, 148, 0, 136, 42, 0, 0, 104, 0, 0
Offset: 1

Views

Author

T. D. Noe, Apr 03 2013

Keywords

Comments

Note that a(n) = 0 for prime(n) = 3 (mod 4). If the zeros are removed, A002314 (with 1 prepended) and A177979 are produced.

Crossrefs

Cf. A223701-A223707 (related sequences).

Programs

  • Mathematica
    nn = 100; t = Table[0, {nn}]; Do[If[Mod[Prime[n], 4] == 3, t[[n]] = -1], {n, nn}]; n = 0; While[Times @@ t == 0, n++; s = FactorInteger[n^2 + 1][[-1, 1]]; p = PrimePi[s]; If[p <= nn && t[[p]] == 0, t[[p]] = n]]; Do[If[Mod[Prime[n], 4] == 3, t[[n]] = 0], {n, nn}]; t