|
|
A062099
|
|
Triangular numbers whose sum of digits is a triangular number.
|
|
1
|
|
|
0, 1, 3, 6, 10, 15, 21, 28, 55, 78, 91, 105, 120, 136, 190, 210, 231, 253, 276, 300, 325, 406, 465, 528, 703, 780, 820, 861, 1081, 1176, 1225, 1275, 1540, 1596, 1653, 1711, 1770, 2080, 2211, 2346, 2701, 2775, 2850, 3003, 3160, 3403, 3486, 3570, 3741, 3828
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
LINKS
|
|
|
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
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|