OFFSET
1,1
COMMENTS
The only triangular odd number with the form 2p+1 and p prime is 15=2*7+1?
The only triangular even numbers with the form 2p and p prime are {6,10}?
From Daniel Starodubtsev, Mar 13 2020: (Start)
Proof that 15 is the only triangular number of the form 2p + 1 where p is prime: we can express T(n)=n*(n+1)/2 and p=(T(n)-1)/2=(n*(n+1)/2-1)/2=(n+2)*(n-1)/4, which can be prime only if n+2=4 or n-1=4, from which we get the only possible value n=5 (T(n)=15).
It can also be easily seen that {6,10} are the only possible values of T(n) such that T(n)/2 is prime. (End)
LINKS
T. D. Noe, Table of n, a(n) for n = 1..10000
EXAMPLE
MAPLE
tn := unapply(n*(n+1)/2, n):
f := unapply((t+1)/2, t):
T := []: N := []: P := []:
for k from 0 to 5000 do
t:=tn(k):
p := f(k):
if p = floor(p) then
p = floor(p):
if isprime(p) then
T := [op(T), t]:
N := [op(N), k]:
P := [op(P), p]:
end if:
end if:
if nops(T) = 50 then
break:
end if:
end do:
T := T;
MATHEMATICA
tri = 0; t = {}; Do[tri = tri + n; If[PrimeQ[(tri + 1)/2], AppendTo[t, tri]], {n, 500}]; t (* T. D. Noe, Sep 24 2012 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
César Eliud Lozada, Sep 22 2012
STATUS
approved