OFFSET
1,1
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
EXAMPLE
1999 is in the sequence because it is a prime number and the sum of its digits 1+9+9+9 = 28 is a triangular number.
MATHEMATICA
t={}; Do[m = Total[IntegerDigits[Prime[n]]]; If[IntegerQ[(Sqrt[8*m + 1]-1)/2], AppendTo[t, Prime[n]]], {n, 700}]; t (* Jayanta Basu, Apr 27 2013 *)
PROG
(PARI) isok(p) = isprime(p) && ispolygonal(sumdigits(p), 3); \\ Michel Marcus, Feb 08 2021
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Luc Stevens (lms022(AT)yahoo.com), Apr 27 2006
STATUS
approved