OFFSET
1,3
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
1350 is in the sequence because (1) it is an enneagonal number and (2) the sum of its digits 1+3+5+0=9 is also an enneagonal number
MAPLE
enne:= proc(x) issqr(56*x+25) and sqrt(56*x+25) mod 7 = 2 end proc:
enne(0):= true:
select(t -> enne(convert(convert(t, base, 10), `+`)), [seq(n*(7*n-5)/2, n=0..1000)]); # Robert Israel, Sep 20 2023
MATHEMATICA
Join[{0}, Select[Table[(n(7n-5))/2, {n, 300}], IntegerQ[(5+Sqrt[25+ 56*Total[ IntegerDigits[#]]])/14]&]] (* Harvey P. Dale, Apr 28 2016 *)
PROG
(PARI) isok(n) = ispolygonal(n, 9) && ispolygonal(sumdigits(n), 9); \\ Michel Marcus, Feb 26 2014
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Luc Stevens (lms022(AT)yahoo.com), Apr 15 2006
STATUS
approved