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-10 of 11 results. Next

A059227 Last entry in n-th row of triangle defined in A059226.

Original entry on oeis.org

1, 1, 4, 18, 94, 544, 3370, 21878, 146924, 1012222, 7114218, 50808592, 367669254, 2689974234, 19864822564, 147875395930, 1108469655350, 8359790718480, 63387403235682, 482935966313310, 3695204342149004, 28383451250732662
Offset: 0

Views

Author

N. J. A. Sloane, Jan 19 2001

Keywords

Programs

  • Mathematica
    T[i_, j_] := T[i, j] = Module[{r, s, t1}, If[i == 0 && j == 0,Return[1]];
    If[j == 0, Return[0]]; t1 = T[i, j - 1]; For[r = 0, r <= i - j, r++,
    For[s = 0, s <= j, s++, If[r + s != i, t1 = t1 + T[r + s, s]]]];
    Return[t1]]; Table[T[n, n], {n, 0, 25}] (* G. C. Greubel, Jan 03 2017 *)
    Join[{1}, CoefficientList[Nest[1+(3x-x^2)#+(x-x^2)#^2&, 1+O[x], 20], x]] (* Oliver Seipel, Dec 28 2024 *)

A059271 Transform of A059226 applied to sequence 0, 1, 0, 0, 0, 0, ...

Original entry on oeis.org

0, 1, 3, 15, 82, 485, 3039, 19862, 133969, 925805, 6521690, 46658955, 338115321, 2476585674, 18306446887, 136384608971, 1023041170426, 7720127405881, 58567844563843, 446422706023630, 3417223098702669, 26257867836211825
Offset: 0

Views

Author

N. J. A. Sloane, Jan 24 2001

Keywords

Crossrefs

A059227 is transform of 1, 0, 0, 0, ...

A059274 Analog of A059226 in which left diagonal is all 1's.

Original entry on oeis.org

1, 1, 2, 1, 5, 8, 1, 11, 28, 39, 1, 23, 80, 164, 214, 1, 47, 208, 548, 1010, 1274, 1, 95, 512, 1632, 3744, 6490, 8028, 1, 191, 1216, 4528, 12248, 25868, 43132, 52698, 1, 383, 2816, 11968, 37024, 90624, 181272, 294366, 356630, 1, 767
Offset: 0

Views

Author

N. J. A. Sloane, Jan 24 2001

Keywords

Examples

			Triangle begins with:
  1;
  1,    2;
  1,    5,    8;
  1,   11,   28,   39;
  1,   23,   80,  164,  214;
  1,   47,  208,  548, 1010, 1274;
  1,   95,  512, 1632, 3744, 6490, 8028;
  ... - _G. C. Greubel_, Jan 03 2017
		

Crossrefs

Programs

  • Mathematica
    T[i_, j_]:= T[i, j] = Module[{r, s, t1}, If[i == 0 && j == 0, Return[1]];
    If[j == 0, Return[1]]; t1 = T[i, j - 1]; For[r = 0, r <= i - j, r++,
    For[s = 0, s <= j, s++, If[r + s != i, t1 = t1 + T[r + s, s]]]];
    Return[t1]]; Table[T[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* G. C. Greubel, Jan 03 2017 *)

A059229 A diagonal of triangle defined in A059226.

Original entry on oeis.org

0, 2, 12, 70, 426, 2708, 17846, 121014, 839388, 5929162, 42509318, 308561388, 2263197114, 16748071210, 124893822012, 937612685502, 7080464093282, 53748285892004, 409909445733950, 3139241855256334, 24132284421690988
Offset: 1

Views

Author

N. J. A. Sloane, Jan 19 2001

Keywords

Programs

  • Mathematica
    T[i_, j_]:= T[i, j] = Module[{r, s, t1}, If[i == 0 && j == 0, Return[1]]; If[j == 0, Return[0]]; t1 = T[i, j - 1]; For[r = 0, r <= i - j, r++,
    For[s = 0, s <= j, s++, If[r + s != i, t1 = t1 + T[r + s, s]]]]; Return[t1]]; Table[T[n, n - 1], {n, 1, 25}] (* G. C. Greubel, Jan 03 2017 *)

A059228 Row sums of triangle defined in A059226.

Original entry on oeis.org

1, 1, 6, 34, 204, 1290, 8486, 57512, 398882, 2817790, 20205084, 146685686, 1076065002, 7964304176, 59400014606, 445991850330, 3368359327020, 25572325390546, 195046637975486, 1493883225366776, 11484930879057370, 88597575768631238
Offset: 0

Views

Author

N. J. A. Sloane, Jan 19 2001

Keywords

A059275 Transform of A059226 applied to sequence 1, 1, 1, 1, 1, 1, 1, ...

Original entry on oeis.org

1, 2, 8, 39, 214, 1274, 8028, 52698, 356630, 2470848, 17440690, 124981126, 906887612, 6650054278, 49202240010, 366856871768, 2753772204894, 20793368929970, 157831516488476, 1203618076715682, 9217256564429454, 70852472349915280
Offset: 0

Views

Author

N. J. A. Sloane, Jan 24 2001

Keywords

Crossrefs

Right diagonal of A059274. A059227 is transform of 1, 0, 0, 0, ...

Programs

  • Mathematica
    T[i_, j_]:= T[i, j] = Module[{r, s, t1}, If[i == 0 && j == 0, Return[1]];
    If[j == 0, Return[1]]; t1 = T[i, j - 1]; For[r = 0, r <= i - j, r++,
    For[s = 0, s <= j, s++, If[r + s != i, t1 = t1 + T[r + s, s]]]];
    Return[t1]]; Table[T[n, n], {n, 0, 25}] (* G. C. Greubel, Jan 04 2017 *)

A059273 Transform of A059226 applied to sequence 0, 0, 1, 0, 0, 0, 0, ...

Original entry on oeis.org

0, 0, 1, 5, 30, 186, 1197, 7953, 54233, 377697, 2676006, 19230738, 139850889, 1027326257, 7612046713, 56825410753, 426995181354, 3227048864886, 24513726327089, 187067287095441, 1433409279614225, 11024386107439141, 85075022074507194
Offset: 0

Views

Author

N. J. A. Sloane, Jan 24 2001

Keywords

Crossrefs

A059227 is transform of 1, 0, 0, 0, ...

A059576 Summatory Pascal triangle T(n,k) (0 <= k <= n) read by rows. Top entry is 1. Each entry is the sum of the parallelogram above it.

Original entry on oeis.org

1, 1, 1, 2, 3, 2, 4, 8, 8, 4, 8, 20, 26, 20, 8, 16, 48, 76, 76, 48, 16, 32, 112, 208, 252, 208, 112, 32, 64, 256, 544, 768, 768, 544, 256, 64, 128, 576, 1376, 2208, 2568, 2208, 1376, 576, 128, 256, 1280, 3392, 6080, 8016, 8016, 6080, 3392, 1280, 256
Offset: 0

Views

Author

Floor van Lamoen, Jan 23 2001

Keywords

Comments

We may also relabel the entries as U(0,0), U(1,0), U(0,1), U(2,0), U(1,1), U(0,2), U(3,0), ... [That is, T(n,k) = U(n-k, k) for 0 <= k <= n and U(m,s) = T(m+s, s) for m,s >= 0.]
From Petros Hadjicostas, Jul 16 2020: (Start)
We explain the parallelogram definition of T(n,k).
T(0,0) *
|\
| \
| * T(k,k)
T(n-k,0) * |
\ |
\|
* T(n,k)
The definition implies that T(n,k) is the sum of all T(i,j) such that (i,j) has integer coordinates over the set
{(i,j): a(1,0) + b(1,1), 0 <= a <= n-k, 0 <= b <= k} - {(n,k)}.
The parallelogram can sometimes be degenerate; e.g., when k = 0 or n = k. (End)
T(n,k) is the number of 2-compositions of n having sum of the entries of the first row equal to k (0 <= k <= n). A 2-composition of n is a nonnegative matrix with two rows, such that each column has at least one nonzero entry and whose entries sum up to n. - Emeric Deutsch, Oct 12 2010
From Michel Marcus and Petros Hadjicostas, Jul 16 2020: (Start)
Robeva and Sun (2020) let A(m,n) = U(m-1, n-1) be the number of subdivisions of a 2-row grid with m points on the top and n points at the bottom (and such that the lower left point is the origin).
The authors proved that A(m,n) = 2*(A(m,n-1) + A(m-1,n) - A(m-1,n-1)) for m, n >= 2 (with (m,n) <> (2,2)), which is equivalent to a similar recurrence for U(n,k) given in the Formula section below. (They did not explicitly specify the value of A(1,1) = U(0,0) because they did not care about the number of subdivisions of a degenerate polygon with only one side.)
They also proved that, for (m,n) <> (1,1), A(m,n) = (2^(m-2)/(n-1)!) * Q_n(m) =
= (2^(m-2)/(n-1)!) * Sum_{k=1..n} A336244(n,k) * m^(n-k), where Q_n(m) is a polynomial in m of degree n-1. (End)
With the square array notation of Petros Hadjicostas, Jul 16 2020 below, U(i,j) is the number of lattice paths from (0,0) to (i,j) whose steps move north or east or have positive slope. For example, representing a path by its successive lattice points rather than its steps, U(1,2) = 8 counts {(0,0),(1,2)}, {(0,0),(0,1),(1,2)}, {(0,0),(0,2),(1,2)}, {(0,0),(1,0),(1,2)}, {(0,0),(1,1),(1,2)}, {(0,0),(0,1),(0,2),(1,2)}, {(0,0),(0,1),(1,1),(1,2)}, {(0,0),(1,0),(1,1),(1,2)}. If north (vertical) steps are excluded, the resulting paths are counted by A049600. - David Callan, Nov 25 2021

Examples

			Triangle T(n,k) (with rows n >= 0 and columns k = 0..n) begins
[0]   1;
[1]   1,   1;
[2]   2,   3,   2;
[3]   4,   8,   8,   4;
[4]   8,  20,  26,  20,   8;
[5]  16,  48,  76,  76,  48,  16;
[6]  32, 112, 208, 252, 208, 112, 32;
  ...
T(5,2) = 76 is the sum of the elements above it in the parallelogram bordered by T(0,0), T(5-2,0) = T(3,0), T(2,2) and T(5,2). We of course exclude T(5,2) from the summation. Thus
T(5,2) = Sum_{a=0..5-2, b=0..2, (a,b) <> (5-2,2)} T(a(1,0) + b(1,1)) =
= (1 + 1 + 2) + (1 + 3 + 8) + (2 + 8 + 26) + (4 + 20) = 76. [Edited by _Petros Hadjicostas_, Jul 16 2020]
From _Petros Hadjicostas_, Jul 16 2020: (Start)
Square array U(n,k) (with rows n >= 0 and columns k >= 0) begins
   1,   1,   2,    4,    8, ...
   1,   3,   8,   20,   48, ...
   2,   8,  26,   76,  208, ...
   4,  20,  76,  252,  768, ...
   8,  48, 208,  768, 2568, ...
  16, 112, 544, 2208, 8016, ...
  ...
Consider the following 2-row grid with n = 3 points at the top and k = 2 points at the bottom:
   A  B  C
   *--*--*
   |    /
   |   /
   *--*
   D  E
The sets of the dividing internal lines of the A(3,2) = U(3-1, 2-1) = 8 subdivisions of the above 2-row grid are as follows: { }, {DC}, {DB}, {EB}, {EA}, {DB, DC}, {DB, EB}, and {EA, EB}. See Robeva and Sun (2020).
These are the 2-compositions of n = 3 with sum of first row entries equal to k = 1:
[1; 2], [0,1; 2,0], [0,1; 1,1], [1,0; 0,2], [1,0; 1,1], [0,0,1; 1,1,0], [0,1,0; 1,0,1], and [1,0,0; 0,1,1]. We have T(3,2) = 8 such matrices. See _Emeric Deutsch_'s contribution above. See also Section 2 in Castiglione et al. (2007). (End)
		

Crossrefs

Programs

  • Haskell
    a059576 n k = a059576_tabl !! n !! k
    a059576_row n = a059576_tabl !! n
    a059576_tabl = [1] : map fst (iterate f ([1,1], [2,3,2])) where
       f (us, vs) = (vs, map (* 2) ws) where
         ws = zipWith (-) (zipWith (+) ([0] ++ vs) (vs ++ [0]))
                          ([0] ++ us ++ [0])
    -- Reinhard Zumkeller, Dec 03 2012
    
  • Magma
    A011782:= func< n | n eq 0 select 1 else 2^(n-1) >;
    function T(n,k) // T = A059576
      if k eq 0 or k eq n then return A011782(n);
      else return 2*T(n-1, k-1) + 2*T(n-1, k) - (2 - 0^(n-2))*T(n-2, k-1);
      end if; return T;
    end function;
    [T(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Sep 02 2022
    
  • Maple
    A059576 := proc(n,k) local b,t1; t1 := min(n+k-2,n,k); add( (-1)^b * 2^(n+k-b-2) * (n+k-b-2)! * (1/(b! * (n-b)! * (k-b)!)) * (-2 * n-2 * k+2 * k^2+b^2-3 * k * b+2 * n^2+5 * n * k-3 * n * b), b=0..t1); end;
    T := proc (n, k) if k <= n then add((-1)^j*2^(n-j-1)*binomial(k, j)*binomial(n-j, k), j = 0 .. min(k, n-k)) fi end proc: 1; for n to 10 do seq(T(n, k), k = 0 .. n) end do; # yields sequence in triangular form # Emeric Deutsch, Oct 12 2010
    T := (n, k) -> `if`(n=0, 1, 2^(n-1)*binomial(n, k)*hypergeom([-k, k - n], [-n], 1/2)): seq(seq(simplify(T(n, k)), k=0..n), n=0..10); # Peter Luschny, Nov 26 2021
  • Mathematica
    T[0, 0] = 1; T[n_, k_] := 2^(n-k-1)*n!*Hypergeometric2F1[ -k, -k, -n, -1 ] / (k!*(n-k)!); Flatten[ Table[ T[n, k], {n, 0, 9}, {k, 0, n}]] (* Jean-François Alcover, Feb 01 2012, after Robert Israel *)
  • SageMath
    def T(n,k): # T = A059576
        if (k==0 or k==n): return 1 if (n==0) else 2^(n-1) # A011782
        else: return 2*T(n-1, k-1) + 2*T(n-1, k) - (2 - 0^(n-2))*T(n-2, k-1)
    flatten([[T(n,k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Sep 02 2022

Formula

T(n, n-1) = A001792(n-1).
T(2*n, n) = A052141(n).
Sum_{k=0..n} T(n, k) = A003480(n).
G.f.: U(z, w) = Sum_{n >= 0, k >= 0} U(n, k)*z^n*w^k = Sum{n >= 0, k >= 0} T(n, k)*z^(n-k)*w^k = (1-z)*(1-w)/(1 - 2*w - 2*z + 2*z*w).
Maple code gives another explicit formula for U(n, k).
From Jon Stadler (jstadler(AT)capital.edu), Apr 30 2003: (Start)
U(n,k) is the number of ways of writing the vector (n,k) as an ordered sum of vectors, equivalently, the number of paths from (0,0) to (n,k) in which steps may be taken from (i,j) to (p,q) provided (p,q) is to the right or above (i,j).
2*U(n,k) = Sum_{i <= n, j <= k} U(i,j).
U(n,k) = 2*U(n-1,k) + Sum_{i < k} U(n,i).
U(n,k) = Sum_{j=0..n+k} C(n,j-k+1)*C(k,j-n+1)*2^j. (End)
T(n, k) = 2*(T(n-1, k-1) + T(n-1, k)) - (2 - 0^(n-2))*T(n-2, k-1) for n > 1 and 1 < k < n; T(n, 0) = T(n, n) = 2*T(n-1, 0) for n > 0; and T(0, 0) = 1. - Reinhard Zumkeller, Dec 03 2004
From Emeric Deutsch, Oct 12 2010: (Start)
Sum_{k=0..n} k*T(n,k) = A181292(n).
T(n,k) = Sum_{j=0..min(k, n-k)} (-1)^j*2^(n-j-1)*binomial(k, j)*binomial(n-j, k) for (n,k) != (0,0).
G.f.: G(t,z) = (1-z)*(1-t*z)/(1 - 2*z - 2*t*z + 2*t*z^2). (End)
U(n,k) = 0 if k < 0; else U(k,n) if k > n; else 1 if n <= 1; else 3 if n = 2 and k = 1; else 2*U(n,k-1) + 2*U(n-1,k) - 2*U(n-1,k-1). - David W. Wilson; corrected in the case k > n by Robert Israel, Jun 15 2011 [Corrected by Petros Hadjicostas, Jul 16 2020]
U(n,k) = binomial(n,k) * 2^(n-1) * hypergeom([-k,-k], [n+1-k], 2) if n >= k >= 0 with (n,k) <> (0,0). - Robert Israel, Jun 15 2011 [Corrected by Petros Hadjicostas, Jul 16 2020]
U(n,k) = Sum_{0 <= i+j <= n+k-1} (-1)^j*C(i+j+1, j)*C(n+i, n)*C(k+i, k). - Masato Maruoka, Dec 10 2019
T(n, k) = 2^(n - 1)*binomial(n, k)*hypergeom([-k, k - n], [-n], 1/2) = A059474(n, k)/2 for n >= 1. - Peter Luschny, Nov 26 2021
From G. C. Greubel, Sep 02 2022: (Start)
T(n, n-k) = T(n, k).
T(n, 0) = T(n, n) = A011782(n).
T(n, n-2) = 2*A049611(n-1), n >= 2.
T(n, n-3) = 4*A049612(n-2), n >= 3.
T(n, n-4) = 8*A055589(n-3), n >= 4.
T(n, n-5) = 16*A055852(n-4), n >= 5.
T(n, n-6) = 32*A055853(n-5), n >= 6.
Sum_{k=0..floor(n/2)} T(n, k) = A181306(n). (End)

A059283 Triangle T(n,k) (0<= k <=n) read by rows. Left edge is 1, 0, 0, ... Otherwise each entry is sum of entry to left, entries immediately above it to left and right and entry directly above it 2 rows back.

Original entry on oeis.org

1, 0, 1, 0, 2, 3, 0, 2, 8, 11, 0, 2, 14, 36, 47, 0, 2, 20, 78, 172, 219, 0, 2, 26, 138, 424, 862, 1081, 0, 2, 32, 216, 856, 2314, 4476, 5557, 0, 2, 38, 312, 1522, 5116, 12768, 23882, 29439, 0, 2, 44, 426, 2476, 9970, 30168, 71294, 130172, 159611, 0, 2, 50, 558
Offset: 0

Views

Author

N. J. A. Sloane, Jan 24 2001

Keywords

Examples

			1; 0,1; 0,2,3; 0,2,8,11; 0,2,14,36,47; ... [36 = 14 + 8 + 11 + 3 for example].
		

Crossrefs

Right edge is A059284. Cf. A059226.
Cf. A224729 (central terms), A122542.

Programs

  • Haskell
    a059283 n k = a059283_tabl !! n !! k
    a059283_row n = a059283_tabl !! n
    a059283_tabl = [1] : [0,1] : f [1] [0,1] where
       f us vs = ws : f vs ws where
         ws = scanl1 (+) $ zipWith (+)
                           ([0]++us++[0]) $ zipWith (+) ([0]++vs) (vs++[0])
    -- Reinhard Zumkeller, Apr 17 2013
  • Mathematica
    t[0, 0] = 1; t[, 0] = 0; t[n, k_] /; 0 <= k <= n := t[n, k] = t[n, k-1] + t[n-1, k-1] + t[n-1, k] + t[n-2, k-1]; t[, ] = 0; Table[t[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Jean-François Alcover, Oct 11 2013 *)

Formula

T(0, 0)=1; T(n, 0)=0, n>0; T(n, k)=T(n, k-1)+T(n-1, k-1)+T(n-1, k)+T(n-2, k-1), n, k>0
G.f. for T(n, k): ((1+2*w+w^2)*z^2+(-1-2*w-w^2)*z-w*(-3*w^2-6*w+1)^(1/2)+2*w)/(1+w)^2/((1+w)*z^2+(w-1)*z+w) (expand first as series in z, then in w).

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Jan 25 2001

A059224 a(n) = 2^(n-3)*(n + 3)*(2*n - 3).

Original entry on oeis.org

18, 70, 224, 648, 1760, 4576, 11520, 28288, 68096, 161280, 376832, 870400, 1990656, 4513792, 10158080, 22708224, 50462720, 111542272, 245366784, 537395200, 1172307968, 2548039680, 5519704064, 11920211968, 25669140480, 55129931776, 118111600640, 252463546368, 538481524736
Offset: 3

Views

Author

N. J. A. Sloane, Jan 19 2001

Keywords

Crossrefs

A diagonal of triangle defined in A059226.

Programs

  • Maple
    seq(2^(n-3)*(n+3)*(2*n-3), n = 3 .. 32); # Emeric Deutsch, Jun 27 2009
  • Mathematica
    Table[2^(n-3)*(n + 3)*(2*n - 3), {n,3,50}] (* or *) LinearRecurrence[{6, -12, 8}, {18, 70, 224}, 25] (* G. C. Greubel, Dec 30 2016 *)
  • PARI
    a(n) = { 2^(n - 3)*(n + 3)*(2*n - 3) } \\ Harry J. Smith, Jun 25 2009

Formula

G.f. = 2x^3*(9-19x+10x^2)/(1-2x)^3. - Emeric Deutsch, Jun 27 2009
From G. C. Greubel, Dec 30 2016: (Start)
a(n) = 6*a(n-1) - 12*a(n-2) + 8*a(n-3).
E.g.f.: (1/8)*((9 + 8*x - 10*x^2) - (9 - 10*x - 8*x^2)*exp(2*x)). (End)
Showing 1-10 of 11 results. Next