OFFSET
0,3
LINKS
Harvey P. Dale, Table of n, a(n) for n = 0..1000
EXAMPLE
1770 is in the sequence because (1) it is a hexagonal number and (2)the sum of its digits 1+7+7+0=15 is also a hexagonal number.
MATHEMATICA
Module[{nn=400, hn}, hn=PolygonalNumber[6, Range[0, nn]]; Select[hn, MemberQ[ hn, Total[ IntegerDigits[#]]]&]] (* Harvey P. Dale, Apr 14 2022 *)
PROG
(PARI) isok(n) = ispolygonal(n, 6) && ispolygonal(sumdigits(n), 6); \\ Michel Marcus, Feb 26 2014
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Luc Stevens (lms022(AT)yahoo.com), Apr 16 2006
STATUS
approved