A225077 Smaller of the two consecutive primes whose sum is a triangular number.
17, 37, 59, 103, 137, 149, 313, 467, 491, 883, 911, 1277, 1423, 1619, 1783, 2137, 2473, 2729, 4127, 4933, 5437, 5507, 6043, 6359, 10039, 10453, 11717, 13397, 15809, 17489, 20807, 21821, 23027, 27631, 28307, 28813, 29669, 33029, 36947, 39103, 44203, 48281
Offset: 1
Keywords
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
Crossrefs
Cf. A175132 (numbers n such that sum of two consecutive primes is triangular(n)).
Programs
-
Maple
f:= proc(n) local m,p,q; m:= n*(n+1)/2; p:= prevprime(ceil(m/2)); q:= nextprime(p); if p+q=m then p fi end proc: map(f, [$3..500]); # Robert Israel, May 04 2020
-
Mathematica
tri[n_] := IntegerQ[Sqrt[1 + 8 n]]; t = {}; p1 = 2; While[Length[t] < 50, p2 = NextPrime[p1]; If[tri[p1 + p2], AppendTo[t, p1]]; p1 = p2]; t (* T. D. Noe, May 28 2013 *)