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.

A369152 Total number of digits in row n of Pascal's triangle.

Original entry on oeis.org

1, 2, 3, 4, 5, 8, 10, 12, 14, 18, 25, 28, 31, 38, 44, 50, 57, 64, 69, 76, 88, 96, 102, 114, 125, 134, 142, 154, 166, 178, 191, 202, 215, 230, 244, 256, 268, 288, 303, 316, 334, 356, 372, 388, 411, 428, 447, 470, 490, 506, 529, 554, 573, 590, 618, 642, 660, 686
Offset: 0

Views

Author

Bartlomiej Pawlik, Jan 14 2024

Keywords

Crossrefs

Programs

  • Maple
    a:= n-> length(cat(seq(binomial(n,k), k=0..n))):
    seq(a(n), n=0..57);  # Alois P. Heinz, Jan 15 2024
  • Mathematica
    A369152[n_Integer] := Total[IntegerLength[Binomial[n, #]] & /@ Range[0, n]]
    First50Terms = Table[A369152[n], {n, 0, 49}]
  • PARI
    a(n) = #concat(vector(n+1, k, Str(binomial(n,k-1)))); \\ Michel Marcus, Jan 18 2024
    
  • Python
    from math import comb
    def A369152(n): return sum(len(str(comb(n,k))) for k in range(n+1)) # Chai Wah Wu, Feb 15 2024

Formula

a(n) = 1 + n + Sum_{k=0..n} floor(log_10(C(n,k))).
a(n) = A055642(A003590(n)). - Michel Marcus, Jan 15 2024