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.

Showing 1-5 of 5 results.

A099962 First column (also row sums) of triangle in A099961.

Original entry on oeis.org

1, 1, 1, 1, 2, 3, 5, 13, 28, 64, 207, 578, 1685, 6518, 22361, 79319, 357180, 1453177, 6075215, 31216968, 146906126, 707344776, 4084254624, 21823224623, 118932148555, 762346849634, 4559139897594, 27742486678915, 195472113041924
Offset: 0

Views

Author

N. J. A. Sloane, Nov 13 2004

Keywords

Crossrefs

Cf. A099961.

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 35 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][1],n=0..35); # Emeric Deutsch, Nov 16 2004
  • Mathematica
    r[n_] := r[n] = If[n == 0, {1}, Module[{a}, Join[a = Accumulate[Reverse[r[n-1]]], If[Mod[n, 3] == 2, {Last[a]}, {}]]]];
    a[n_] := If[n == 0, 1, r[n][[1]]];
    Table[a[n], {n, 0, 28}] (* Jean-François Alcover, Mar 10 2023 *)

Extensions

More terms from Emeric Deutsch, Nov 16 2004

A099963 Sequence of the next-to-last entries in the rows of A099961.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Nov 13 2004

Keywords

Crossrefs

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

A099967 Second column of triangle in A099961.

Original entry on oeis.org

1, 2, 3, 5, 10, 23, 51, 128, 386, 1092, 3370, 12458, 43037, 158638, 691999, 2827035, 12150430, 60980759, 287737037, 1414689552, 8021603122, 42939104470, 237864297110, 1502870474645, 8999347646633, 55484973357830
Offset: 0

Views

Author

N. J. A. Sloane, Nov 13 2004

Keywords

Crossrefs

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 31 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][2],n=2..31); # Emeric Deutsch, Nov 16 2004

Extensions

More terms from Emeric Deutsch, Nov 16 2004

A099959 Triangle read by rows: Each row is constructed by forming the partial sums of the previous row, reading from the right and at every other row repeating the final term.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 2, 3, 3, 3, 6, 8, 8, 14, 17, 17, 17, 34, 48, 56, 56, 104, 138, 155, 155, 155, 310, 448, 552, 608, 608, 1160, 1608, 1918, 2073, 2073, 2073, 4146, 6064, 7672, 8832, 9440, 9440, 18272, 25944, 32008, 36154, 38227, 38227, 38227, 76454, 112608
Offset: 0

Views

Author

N. J. A. Sloane, Nov 13 2004

Keywords

Comments

...

Examples

			Triangle begins
   1;
   1,
   1,   1;
   1,   2,
   2,   3,   3;
   3,   6,   8,
   8,  14,  17,  17;
  17,  34,  48,  56,
  56, 104, 138, 155, 155;
		

Crossrefs

First column (and row sums) gives A099960.
If an extra term is added to /every/ row we get A008282. Cf. A099961.

Programs

  • Haskell
    a099959 n k = a099959_tabl !! n !! k
    a099959_row n = a099959_tabl !! n
    a099959_tabl = map snd $ iterate f (False,[1]) where
       f (s,xs) = (not s, if s then zs ++ [last zs] else zs)
         where zs = scanl1 (+) (reverse xs)
    -- Reinhard Zumkeller, Dec 28 2011
  • 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 18 do if n mod 2 = 1 then R[n]:=ps(rev(R[n-1])) else R[n]:=pss(rev(R[n-1])) fi od: for n from 0 to 18 do evalm(R[n]) od; # program yields the successive rows # Emeric Deutsch, Nov 16 2004
  • Mathematica
    row[0] = row[1] = {1}; row[n_?OddQ] := Accumulate[ Reverse[ row[n-1] ] ]; row[n_?EvenQ] := (r = Accumulate[ Reverse[ row[n-1] ] ]; AppendTo[r, Last[r] ]); Flatten[ Table[ row[n], {n, 0, 13}]] (* Jean-François Alcover, Dec 16 2011 *)

Extensions

More terms from Emeric Deutsch, Nov 16 2004

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

Views

Author

N. J. A. Sloane, Nov 13 2004

Keywords

Comments

...

Examples

			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;
		

Crossrefs

First column (and row sums) gives A099965. Cf. A099966, A099968.
If an extra term is added to /every/ row we get A008282. Cf. A099959, A099961.
Cf. A010054.

Programs

  • Haskell
    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
  • 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: 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
  • Mathematica
    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 *)

Extensions

More terms from Emeric Deutsch, Nov 16 2004
Showing 1-5 of 5 results.