OFFSET
1,3
LINKS
Harry J. Smith, Table of n, a(n) for n = 1..1000
EXAMPLE
a(8) = 28 is a triangular number and the sum of digits 10 is also a triangular number.
MATHEMATICA
With[{trnos=Accumulate[Range[0, 200]]}, Select[trnos, MemberQ[trnos, Total[ IntegerDigits[ #]]]&]] (* Harvey P. Dale, Feb 26 2013 *)
PROG
(PARI) SumD(x)= { s=0; while (x>9, s+=x-10*(x\10); x\=10); return(s + x) } { default(realprecision, 100); n=t=0; for (m=0, 10^4, s=SumD(t+=m); if (((sqrt(8*s + 1) - 1)/2)%1 == 0, write("b062099.txt", n++, " ", t); if (n==1000, break)) ) } \\ Harry J. Smith, Aug 01 2009
(Magma) [ t: n in [0..90] | IsSquare(8*s+1) where s is &+Intseq(t) where t is n*(n+1) div 2 ]; // Bruno Berselli, May 27 2011
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Amarnath Murthy, Jun 16 2001
EXTENSIONS
More terms from Erich Friedman, Jun 20 2001
STATUS
approved