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.

A350851 Cumulative sums of the first ceiling(n/2)+1 elements of rows 0 to n in Pascal's triangle.

Original entry on oeis.org

1, 3, 6, 13, 24, 50, 92, 191, 354, 736, 1374, 2860, 5370, 11182, 21090, 43909, 83112, 172958, 328340, 682862, 1299528, 2700820, 5150688, 10697070, 20437756, 42415272, 81170004, 168337168, 322613196, 668607412, 1283037084, 2657319103, 5105342946, 10567113352, 20323851054
Offset: 0

Views

Author

J. Stauduhar, Jan 18 2022

Keywords

Examples

			The first ceiling(n/2)+1 elements from the first four rows of Pascal's are:
     1
    1 1
   1 2
  1 3 3
So a(0)=1, a(1)=a(0)+1+1=3, a(2)=a(1)+1+2=6, a(3)=a(2)+1+3+3=13.
		

Crossrefs

Cf. A007318, A116496 (for n>=2, first differences).

Programs

  • Python
    seq=[];prev=[];total=0
    for n in range(30):
      row=[1]
      last=int(n/2)
      for k in range(last):
        row.append(prev[k]+prev[k+1])
      if n%2==1:
        row.append(row[-1])
      prev=row
      total+=sum(row)
      seq.append(total)
    print(seq)