A004160 Sum of digits of the n-th tetrahedral number.
1, 4, 1, 2, 8, 11, 12, 3, 12, 4, 16, 13, 14, 11, 14, 15, 24, 6, 7, 10, 16, 8, 5, 8, 18, 18, 18, 10, 22, 19, 20, 26, 20, 12, 21, 21, 22, 25, 13, 14, 11, 14, 15, 15, 15, 25, 19, 16, 17, 5, 17, 18, 18, 18, 19, 22, 19, 11, 26, 20, 21, 21, 21, 22, 25, 13, 23, 20, 23, 24, 24, 24, 25, 10, 16, 26
Offset: 1
Links
- Harvey P. Dale, Table of n, a(n) for n = 1..1000
Programs
-
Mathematica
Total[IntegerDigits[#]]&/@Table[(n(n+1)(n+2))/6,{n,80}] (* Harvey P. Dale, Jul 31 2013 *)
-
PARI
a(n)=sumdigits(n*(n+1)*(n+2)/6) \\ Charles R Greathouse IV, Dec 19 2016