OFFSET
1,3
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..3618
EXAMPLE
1596 is in the sequence because (1) it is a triangular number and (2) the sum of its digits 1+5+9+6=21 is an octagonal number.
MATHEMATICA
Join[{0}, Select[Accumulate[Range[400]], IntegerQ[(1+Sqrt[1+3*Total[ IntegerDigits[ #]]])/3]&]] (* Harvey P. Dale, May 06 2019 *)
PROG
(PARI) isok(n) = ispolygonal(n, 3) && ispolygonal(sumdigits(n), 8); \\ Michel Marcus, Feb 26 2014
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Luc Stevens (lms022(AT)yahoo.com), Apr 30 2006
STATUS
approved