cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

Original entry on oeis.org

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

Views

Author

Keywords

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
    

Formula

a(n) = A000030(A000217(n)). - Reinhard Zumkeller, May 12 2010