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.
%I A099964 #23 Aug 03 2021 19:05:00 %S A099964 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, %T A099964 352,352,665,900,1026,1026,1926,2591,2943,2943,2943,5886,8477,10403, %U A099964 11429,11429,21832,30309,36195,39138,39138,75333,105642,127474,138903 %N 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. %C A099964 ... %H A099964 Reinhard Zumkeller, <a href="/A099964/b099964.txt">Rows n = 0..500 of triangle, flattened</a> %e A099964 Triangle begins %e A099964 1; %e A099964 1, 1; %e A099964 1, 2, %e A099964 2, 3, 3; %e A099964 3, 6, 8, %e A099964 8, 14, 17, %e A099964 17, 31, 39, 39; %e A099964 39, 78, 109, 126, %e A099964 126, 235, 313, 352, %e A099964 352, 665, 900, 1026, %e A099964 1026, 1926, 2591, 2943, 2943; %p A099964 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 %t A099964 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 *) %o A099964 (Haskell) %o A099964 a099964 n k = a099964_tabf !! n !! k %o A099964 a099964_row n = a099964_tabf !! n %o A099964 a099964_tabf = scanl f [1] $ tail a010054_list where %o A099964 f row t = if t == 1 then row' ++ [last row'] else row' %o A099964 where row' = scanl1 (+) $ reverse row %o A099964 -- _Reinhard Zumkeller_, May 02 2012 %Y A099964 First column (and row sums) gives A099965. Cf. A099966, A099968. %Y A099964 If an extra term is added to /every/ row we get A008282. Cf. A099959, A099961. %Y A099964 Cf. A010054. %K A099964 nonn,tabf,nice,easy %O A099964 0,5 %A A099964 _N. J. A. Sloane_, Nov 13 2004 %E A099964 More terms from _Emeric Deutsch_, Nov 16 2004