OFFSET
0,3
EXAMPLE
651 is in the sequence because it is a pentagonal number and the sum of its digits 6 + 5 + 1 = 12 is also a pentagonal number.
MAPLE
a:=proc(n) local P, s: P:=convert(n*(3*n-1)/2, base, 10): s:=add(P[j], j=1..nops(P)): if n=0 then 0 elif type((1+sqrt(1+24*s))/6, integer) then n*(3*n-1)/2 fi end: seq(a(n), n=0..350); # Emeric Deutsch, Apr 15 2006
MATHEMATICA
With[{pnts=Table[(n(3n-1))/2, {n, 0, 500}]}, Select[pnts, MemberQ[ pnts, Total[ IntegerDigits[#]]]&]] (* Harvey P. Dale, Sep 25 2018 *)
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Luc Stevens (lms022(AT)yahoo.com), Apr 13 2006
STATUS
approved