A099963 Sequence of the next-to-last entries in the rows of A099961.
1, 1, 2, 5, 10, 23, 64, 179, 514, 1685, 5940, 20676, 79319, 334819, 1373858, 6075215, 29763791, 140830911, 707344776, 3937348498, 21115879847, 118932148555, 740523625011, 4440207749039, 27742486678915, 190912973144330
Offset: 0
Programs
-
Maple
with(linalg):rev:=proc(a) local n, p; n:=vectdim(a): p:=i->a[n+1-i]: vector(n,p) end: ps:=proc(a) local n, q; n:=vectdim(a): q:=i->sum(a[j],j=1..i): vector(n,q) end: pss:=proc(a) local n, q; n:=vectdim(a): q:=proc(i) if i<=n then sum(a[j],j=1..i) else sum(a[j],j=1..n) fi end: vector(n+1,q) end: R[0]:=vector(1,1): for n from 1 to 30 do if n mod 3 = 0 or n mod 3 = 1 then R[n]:=ps(rev(R[n-1])) else R[n]:=pss(rev(R[n-1])) fi od: seq(R[n][vectdim(R[n])-1],n=2..30); # Emeric Deutsch, Nov 16 2004
Extensions
More terms from Emeric Deutsch, Nov 16 2004