Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
A008953
a(n) is the leading digit of the n-th triangular number, n*(n+1)/2.
3
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,2
LINKS
FORMULA
a(n) = A000030(A000217(n)). - Reinhard Zumkeller, May 12 2010
MATHEMATICA
Array[IntegerDigits[# (# + 1) / 2][[1]]&, 100] (* Vincenzo Librandi, Apr 12 2019 *)
IntegerDigits[#][[1]]&/@Accumulate[Range[100]] (* Harvey P. Dale, Oct 15 2022 *)
PROG
(PARI) a(n) = digits(n*(n+1)/2)[1]; \\ Michel Marcus, Jun 20 2018
(Magma) [Intseq((n*(n+1) div 2))[#Intseq((n*(n+1) div 2))]: n in [1..100]]; // Vincenzo Librandi, Apr 12 2019
CROSSREFS
Sequence in context: A142464 A177022 A325634 * A104611 A076790 A095693
KEYWORD
nonn,base,easy
STATUS
approved