A008953 a(n) is the leading digit of the n-th triangular number, n*(n+1)/2.
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, 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, 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
Offset: 1
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 1..1000
Crossrefs
Programs
-
Magma
[Intseq((n*(n+1) div 2))[#Intseq((n*(n+1) div 2))]: n in [1..100]]; // Vincenzo Librandi, Apr 12 2019
-
Mathematica
Array[IntegerDigits[# (# + 1) / 2][[1]]&, 100] (* Vincenzo Librandi, Apr 12 2019 *) IntegerDigits[#][[1]]&/@Accumulate[Range[100]] (* Harvey P. Dale, Oct 15 2022 *)
-
PARI
a(n) = digits(n*(n+1)/2)[1]; \\ Michel Marcus, Jun 20 2018