OFFSET
0,2
EXAMPLE
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.
PROG
(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)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
J. Stauduhar, Jan 18 2022
STATUS
approved