OFFSET
1,1
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.
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
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.
EXAMPLE
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, ....
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 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alonso del Arte, Aug 02 2004
EXTENSIONS
Edited and extended by Robert G. Wilson v, Aug 12 2004
STATUS
approved