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.

A096333 Prime numbers that are 2 less than a prime-indexed odd triangular number or 1 more than a prime-indexed even triangular number.

Original entry on oeis.org

7, 13, 29, 67, 89, 151, 191, 277, 433, 701, 859, 947, 1129, 1429, 1889, 2557, 2699, 4003, 4751, 5779, 8647, 11173, 12401, 13367, 14029, 16111, 18719, 19501, 22367, 24977, 27259, 31627, 33151, 36313, 36857, 38501, 39619, 47279, 49139, 56951
Offset: 1

Views

Author

Alonso del Arte, Aug 02 2004

Keywords

Examples

			a(2) = 13 because 15 is the 5th triangular number and since it is odd and we take 2 away from it, it yields the prime 13.
a(3) = 29 because 28 is the 7th triangular number and since it is even and we add 1 to it, it yields the prime 29.
497 is not on the list because although 496 is the 31st triangular number, but 496 + 1 = 7 * 71.
That sequence continues: 1771, 2279, 3161, 3487, 5149, 5357, 5993, 6439, 8129, 9451, 9731, ....
		

References

  • David Wells, The Penguin Dictionary of Curious & Interesting Numbers. In the entry for 496 he remarks that 496 is the smallest counterexample to the conjecture that an even, prime-indexed triangular plus 1 equals a prime, since 497 is not prime.

Crossrefs

Cf. A034953.

Programs

  • Mathematica
    tri[n_] := n(n + 1)/2; tp = Table[ tri[ Prime[n]], {n, 2, 70}]; f[n_] := If[ OddQ[n], n - 2, n + 1]; Select[f /@ tp, PrimeQ[ # ] &] (* Robert G. Wilson v, Aug 12 2004 *)
    Select[If[OddQ[#],#-2,#+1]&/@Table[(n(n+1))/2,{n,Prime[Range[ 100]]}], PrimeQ] (* Harvey P. Dale, Sep 19 2016 *)

Formula

Given the numbers of A034953, triangular numbers with prime indices, subtract 2 from the odd numbers on the list and add 1 to the even numbers on the list, then remove from the list the composite numbers.

Extensions

Edited and extended by Robert G. Wilson v, Aug 12 2004