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.

A125768 Least number k such that n*T_k +/- 1 is prime.

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 2, 3, 1, 3, 1, 4, 1, 3, 2, 3, 1, 3, 1, 3, 1, 4, 1, 3, 1, 3, 1, 3, 1, 3, 2, 3, 1, 3, 1, 3, 2, 4, 1, 3, 1, 3, 1, 3, 2, 3, 1, 3, 1, 4, 1, 4, 1, 3, 1, 3, 2, 3, 1, 7, 1, 3, 1, 3, 1, 3, 2, 3, 1, 8, 1, 3, 2, 3, 2, 3, 1, 4, 1, 3, 1, 3, 1, 3, 1, 3
Offset: 1

Views

Author

Keywords

Comments

k times the n-th triangular number plus or minus 1 is prime.
Eventually every prime p appears since (p +/-1) times 1(1+1)/2 equals (p +/- 1).
The first occurrence of k: 1, 26, 5, 31, 320, 698, 79, 89, 1058, 7404, 223, 299, 8504, 13630, 845, 1217, 3334, 26074, 2349, 1835, 71926, 111616, 2473, 1189, 27754, 140366, 3709, 4109, 250126, 223078, 30359, 9649, ...,.

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{k = 1, trnglr = n*k(k + 1)/2}, While[ !PrimeQ[trnglr - 1] && !PrimeQ[trnglr + 1], k++ ]; k]; Array[f, 105]