The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A004157 Sum of digits of n-th triangular number. 4

%I #26 Mar 31 2024 15:31:07

%S 0,1,3,6,1,6,3,10,9,9,10,12,15,10,6,3,10,9,9,10,3,6,10,15,3,10,9,18,

%T 10,12,15,19,15,12,19,9,18,10,12,15,10,15,12,19,18,9,10,12,15,10,15,

%U 12,19,9,18,10,21,15,10,15,12,19,18,9,10,12,6,19,15,12,19,18,18,10,21,15,19,6,12,10

%N Sum of digits of n-th triangular number.

%H Robert Israel, <a href="/A004157/b004157.txt">Table of n, a(n) for n = 0..10000</a>

%F a(n) = A007953(A000217(n)). - _Robert Israel_, Jun 18 2015

%p seq(convert(convert(n*(n+1)/2,base,10),`+`), n=0..100); # _Robert Israel_, Jun 18 2015

%t Table[Plus@@IntegerDigits@(n (n + 1) / 2), {n, 0, 90}] (* _Vincenzo Librandi_, Jun 18 2015 *)

%t Total[IntegerDigits[#]]&/@Accumulate[Range[0,100]] (* _Harvey P. Dale_, Mar 31 2024 *)

%o (Magma) [&+Intseq(n*(n+1) div 2): n in [0..80] ]; // _Vincenzo Librandi_, Jun 18 2015

%o (PARI) a(n) = sumdigits(n*(n+1)/2); \\ _Michel Marcus_, Jun 18 2015

%Y Cf. A000217, A007953, A062688, A145389.

%K nonn,base

%O 0,3

%A _N. J. A. Sloane_

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 25 17:30 EDT 2024. Contains 372804 sequences. (Running on oeis4.)