OFFSET
0,3
LINKS
Harvey P. Dale, Table of n, a(n) for n = 0..1000
EXAMPLE
1160 is in the sequence because (1) it is an octagonal number and (2)the sum of its digits 1+1+6+0=8 is also an octagonal number.
MATHEMATICA
octQ[n_] := IntegerQ[(Sqrt[3 n + 1] + 1)/3]; t = {0}; Do[x = n*(3 n - 2); If[octQ[Plus @@ IntegerDigits[x]], AppendTo[t, x]], {n, 450}]; t (* Jayanta Basu, Jul 13 2013 *)
With[{oct=PolygonalNumber[8, Range[0, 500]]}, Select[oct, MemberQ[oct, Total[ IntegerDigits[ #]]]&]] (* The program uses the PolygonalNumber function from Mathematica version 10 *) (* Harvey P. Dale, Mar 06 2016 *)
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Luc Stevens (lms022(AT)yahoo.com), Apr 17 2006
STATUS
approved