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.

A125770 First occurrence of n in A125769.

Original entry on oeis.org

1, 2, 7, 9, 34, 31, 54, 15, 16, 26, 148, 68, 398, 62, 193, 25, 27, 140, 550, 397, 107, 113, 50, 122, 950, 226, 38, 169, 40, 562, 187, 44, 327, 763, 70, 211, 362, 49, 1726, 79, 394, 153, 55, 202, 1600, 125, 61, 419, 94, 95, 225, 98, 66, 1036, 508, 1298, 983, 69, 71
Offset: 1

Views

Author

Keywords

Comments

If we restrict ourselves to just j*T_k +1 or j*T_k -1 then there are values which do not occur. As an example if the minus is used then 8 and 9 are missing.

Crossrefs

A125769 = a(n) is the least number j such that j*T_k +/- 1 is n-th prime for some k-th triangular number.

Programs

  • Mathematica
    triQ[n_] := IntegerQ@ Sqrt[8*n + 1]; f[n_] := Block[{j = 1, p = Prime@n}, While[ !triQ[(p - 1)/j] && !triQ[(p + 1)/j], j++ ]; j]; t = Table[0, {100}]; Do[ a = f@n; If[a < 101 && t[[a]] == 0, t[[a]] = n; Print[{a, n}]], {n, 3500}]; t