A099964
Triangle read by rows: The n-th row is constructed by forming the partial sums of the previous row, reading from the right and if n is a triangular number repeating the final term.
Original entry on oeis.org
1, 1, 1, 1, 2, 2, 3, 3, 3, 6, 8, 8, 14, 17, 17, 31, 39, 39, 39, 78, 109, 126, 126, 235, 313, 352, 352, 665, 900, 1026, 1026, 1926, 2591, 2943, 2943, 2943, 5886, 8477, 10403, 11429, 11429, 21832, 30309, 36195, 39138, 39138, 75333, 105642, 127474, 138903
Offset: 0
Triangle begins
1;
1, 1;
1, 2,
2, 3, 3;
3, 6, 8,
8, 14, 17,
17, 31, 39, 39;
39, 78, 109, 126,
126, 235, 313, 352,
352, 665, 900, 1026,
1026, 1926, 2591, 2943, 2943;
-
a099964 n k = a099964_tabf !! n !! k
a099964_row n = a099964_tabf !! n
a099964_tabf = scanl f [1] $ tail a010054_list where
f row t = if t == 1 then row' ++ [last row'] else row'
where row' = scanl1 (+) $ reverse row
-- Reinhard Zumkeller, May 02 2012
-
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: tr:={seq(n*(n+1)/2,n=1..30)}: R[0]:=vector(1,1): for n from 1 to 15 do if member(n,tr)=false then R[n]:=ps(rev(R[n-1])) else R[n]:=pss(rev(R[n-1])) fi od: for n from 0 to 15 do evalm(R[n]) od; # Emeric Deutsch, Nov 16 2004
-
triQ[n_] := Reduce[ n == k(k+1)/2, k, Integers] =!= False; row[0] = {1}; row[1] = {1, 1}; row[n_] := row[n] = (ro = Accumulate[ Reverse[ row[n-1]]]; If[triQ[n], Append[ ro, Last[ro] ], ro]); Flatten[ Table[ row[n], {n, 0, 13}]](* Jean-François Alcover, Nov 24 2011 *)
A099966
Sequence of the next-to-last entries in the rows of A099964.
Original entry on oeis.org
1, 1, 3, 6, 14, 39, 109, 313, 900, 2943, 10403, 36195, 127474, 447352, 1711141, 7234223, 29672119, 123515469, 511672779, 2123410053, 9349845765, 45883313142, 216991244323, 1041956760633, 4977352149113, 23819499579914
Offset: 1
-
a099966 n = a099966_list !! (n-1)
a099966_list = map (last . init) $ tail a099964_tabf
-- Reinhard Zumkeller, May 02 2012
-
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: tr:={seq(n*(n+1)/2,n=1..30)}: R[0]:=vector(1,1): for n from 1 to 30 do if member(n,tr)=false 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=1..30); # Emeric Deutsch, Nov 16 2004
-
triQ[n_] := Module[{k}, Reduce[n == k (k + 1)/2, k, Integers] =!= False];
row[0] = {1}; row[1] = {1, 1}; row[n_] := row[n] = (ro = Accumulate[ Reverse[ row[n - 1]]]; If[triQ[n], Append[ro, Last[ro]], ro]); a[n_] := row[n][[-2]]; Array[a, 26] (* Jean-François Alcover, Feb 13 2018 *)
A099968
Second column of triangle in A099964.
Original entry on oeis.org
1, 2, 3, 6, 14, 31, 78, 235, 665, 1926, 5886, 21832, 75333, 266377, 933842, 3422282, 14954936, 61055379, 254751651, 1054728818, 4378056288, 18699691530, 94021272519, 443332334411, 2132051480643, 10181045388314, 48729093879838
Offset: 1
-
a099968 = flip a099964 1 -- Reinhard Zumkeller, May 02 2012
-
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: tr:={seq(n*(n+1)/2,n=1..30)}: R[0]:=vector(1,1): for n from 1 to 30 do if member(n,tr)=false then R[n]:=ps(rev(R[n-1])) else R[n]:=pss(rev(R[n-1])) fi od: seq(R[n][2],n=1..30); # Emeric Deutsch, Nov 16 2004
Showing 1-3 of 3 results.
Comments