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!)
A008953 a(n) is the leading digit of the n-th triangular number, n*(n+1)/2. 3

%I #25 Oct 15 2022 16:37:05

%S 1,3,6,1,1,2,2,3,4,5,6,7,9,1,1,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,

%T 6,6,7,7,7,8,8,9,9,9,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,

%U 2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4

%N a(n) is the leading digit of the n-th triangular number, n*(n+1)/2.

%H R. Zumkeller, <a href="/A008953/b008953.txt">Table of n, a(n) for n = 1..1000</a>

%F a(n) = A000030(A000217(n)). - _Reinhard Zumkeller_, May 12 2010]

%t Array[IntegerDigits[# (# + 1) / 2][[1]]&, 100] (* _Vincenzo Librandi_, Apr 12 2019 *)

%t IntegerDigits[#][[1]]&/@Accumulate[Range[100]] (* _Harvey P. Dale_, Oct 15 2022 *)

%o (PARI) a(n) = digits(n*(n+1)/2)[1]; \\ _Michel Marcus_, Jun 20 2018

%o (Magma) [Intseq((n*(n+1) div 2))[#Intseq((n*(n+1) div 2))]: n in [1..100]]; // _Vincenzo Librandi_, Apr 12 2019

%Y Cf. A000030, A000217, A008954. - _Reinhard Zumkeller_, May 12 2010

%K nonn,base

%O 1,2

%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 April 25 09:16 EDT 2024. Contains 371967 sequences. (Running on oeis4.)