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.

A054125 Sum of the arrays in A054123 and A054124.

Original entry on oeis.org

2, 2, 2, 2, 2, 2, 2, 3, 3, 2, 2, 4, 4, 4, 2, 2, 5, 6, 6, 5, 2, 2, 6, 9, 8, 9, 6, 2, 2, 7, 13, 12, 12, 13, 7, 2, 2, 8, 18, 19, 16, 19, 18, 8, 2, 2, 9, 24, 30, 24, 24, 30, 24, 9, 2, 2, 10, 31, 46, 39, 32, 39, 46, 31, 10, 2, 2, 11, 39, 68, 65, 48, 48, 65
Offset: 0

Views

Author

Keywords

Comments

Row sums are twice Fibonacci numbers, A006355(n+2).

Examples

			Rows:
  2;
  2,2;
  2,2,2;
  2,3,3,2;
  ...
		

Programs

Formula

From Jianing Song, May 30 2022: (Start)
T(n,k) = 2 if k = 0 or k = n, A052509(n-1,k) + A052509(n-1,n-k) otherwise.
G.f.: Sum_{n>=0, 0<=k<=n} T(n,k) * x^n * y^k = (1-x^2*y) * (1/((1-x*y)*(1-x-x^2*y)) + 1/((1-x)*(1-x*y-x^2*y))). (End)

A052509 Knights-move Pascal triangle: T(n,k), n >= 0, 0 <= k <= n; T(n,0) = T(n,n) = 1, T(n,k) = T(n-1,k) + T(n-2,k-1) for k = 1,2,...,n-1, n >= 2.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 3, 2, 1, 1, 4, 4, 2, 1, 1, 5, 7, 4, 2, 1, 1, 6, 11, 8, 4, 2, 1, 1, 7, 16, 15, 8, 4, 2, 1, 1, 8, 22, 26, 16, 8, 4, 2, 1, 1, 9, 29, 42, 31, 16, 8, 4, 2, 1, 1, 10, 37, 64, 57, 32, 16, 8, 4, 2, 1, 1, 11, 46, 93, 99, 63, 32, 16, 8, 4, 2, 1
Offset: 0

Views

Author

N. J. A. Sloane, Mar 17 2000

Keywords

Comments

Also square array T(n,k) (n >= 0, k >= 0) read by antidiagonals: T(n,k) = Sum_{i=0..k} binomial(n,i).
As a number triangle read by rows, this is T(n,k) = Sum_{i=n-2*k..n-k} binomial(n-k,i), with T(n,k) = T(n-1,k) + T(n-2,k-1). Row sums are A000071(n+2). Diagonal sums are A023435(n+1). It is the reverse of the Whitney triangle A004070. - Paul Barry, Sep 04 2005
Also, twice number of orthants intersected by a generic k-dimensional subspace of R^n [Naiman and Scheinerman, 2017]. - N. J. A. Sloane, Mar 03 2018

Examples

			Triangle begins:
[0] 1;
[1] 1, 1;
[2] 1, 2,  1;
[3] 1, 3,  2,  1;
[4] 1, 4,  4,  2,  1;
[5] 1, 5,  7,  4,  2,  1;
[6] 1, 6, 11,  8,  4,  2, 1;
[7] 1, 7, 16, 15,  8,  4, 2, 1;
[8] 1, 8, 22, 26, 16,  8, 4, 2, 1;
[9] 1, 9, 29, 42, 31, 16, 8, 4, 2, 1;
As a square array, this begins:
  1  1  1  1  1  1 ...
  1  2  2  2  2  2 ...
  1  3  4  4  4  4 ...
  1  4  7  8  8  8 ...
  1  5 11 15 16 ...
  1  6 16 26 31 32 ...
		

Crossrefs

Row sums A000071; Diagonal sums A023435; Mirror A004070.
Columns give A000027, A000124, A000125, A000127, A006261, ...
Partial sums across rows of (extended) Pascal's triangle A052553.

Programs

  • GAP
    A052509:=Flat(List([0..100],n->List([0..n],k->Sum([0..n],m->Binomial(n-k,k-m))))); # Muniru A Asiru, Sat Feb 17 2018
    
  • Haskell
    a052509 n k = a052509_tabl !! n !! k
    a052509_row n = a052509_tabl !! n
    a052509_tabl = [1] : [1,1] : f [1] [1,1] where
       f row' row = rs : f row rs where
         rs = zipWith (+) ([0] ++ row' ++ [1]) (row ++ [0])
    -- Reinhard Zumkeller, Nov 22 2012
    
  • Magma
    [[(&+[Binomial(n-k, k-j): j in [0..n]]): k in [0..n]]: n in [0..10]]; // G. C. Greubel, May 13 2019
    
  • Maple
    a := proc(n::nonnegint, k::nonnegint) option remember: if k=0 then RETURN(1) fi: if k=n then RETURN(1) fi: a(n-1,k)+a(n-2,k-1) end: for n from 0 to 11 do for k from 0 to n do printf(`%d,`,a(n,k)) od: od: # James Sellers, Mar 17 2000
    with(combinat): for s from 0 to 11 do for n from s to 0 by -1 do if n=0 or s-n=0 then printf(`%d,`,1) else printf(`%d,`,sum(binomial(n, i), i=0..s-n)) fi; od: od: # James Sellers, Mar 17 2000
  • Mathematica
    Table[Sum[Binomial[n-k, k-m], {m, 0, n}], {n, 0, 10}, {k, 0, n}]
    T[n_, k_] := Hypergeometric2F1[-k, -n + k, -k, -1];
    Table[T[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Peter Luschny, Nov 28 2021 *)
  • PARI
    T(n,k)=sum(m=0,n,binomial(n-k,k-m));
    for(n=0,10,for(k=0,n,print1(T(n,k),", "););print();); /* show triangle */
    
  • Sage
    [[sum(binomial(n-k, k-j) for j in (0..n)) for k in (0..n)] for n in (0..10)] # G. C. Greubel, May 13 2019

Formula

T(n, k) = Sum_{m=0..n} binomial(n-k, k-m). - Wouter Meeussen, Oct 03 2002
From Werner Schulte, Feb 15 2018: (Start)
Referring to the square array T(i,j):
G.f. of row n: Sum_{k>=0} T(n,k) * x^k = (1+x)^n / (1-x).
G.f. of T(i,j): Sum_{k>=0, n>=0} T(n,k) * x^k * y^n = 1 / ((1-x)*(1-y-x*y)).
Let a_i(n) be multiplicative with a_i(p^e) = T(i, e), p prime and e >= 0, then Sum_{n>0} a_i(n)/n^s = (zeta(s))^(i+1) / (zeta(2*s))^i for i >= 0.
(End)
T(n, k) = hypergeom([-k, -n + k], [-k], -1). - Peter Luschny, Nov 28 2021
From Jianing Song, May 30 2022: (Start)
Referring to the triangle, G.f.: Sum_{n>=0, 0<=k<=n} T(n,k) * x^n * y^k = 1 / ((1-x*y)*(1-x-x^2*y)).
T(n,k) = 2^(n-k) for ceiling(n/2) <= k <= n. (End)

Extensions

More terms from James Sellers, Mar 17 2000
Entry formed by merging two earlier entries. - N. J. A. Sloane, Jun 17 2007
Edited by Johannes W. Meijer, Jul 24 2011

A052553 Square array of binomial coefficients T(n,k) = binomial(n,k), n >= 0, k >= 0, read by upward antidiagonals.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 2, 0, 0, 1, 3, 1, 0, 0, 1, 4, 3, 0, 0, 0, 1, 5, 6, 1, 0, 0, 0, 1, 6, 10, 4, 0, 0, 0, 0, 1, 7, 15, 10, 1, 0, 0, 0, 0, 1, 8, 21, 20, 5, 0, 0, 0, 0, 0, 1, 9, 28, 35, 15, 1, 0, 0, 0, 0, 0, 1, 10, 36, 56, 35, 6, 0, 0, 0, 0, 0, 0, 1, 11, 45, 84, 70, 21, 1, 0, 0, 0, 0, 0, 0, 1, 12, 55
Offset: 0

Views

Author

N. J. A. Sloane, Mar 17 2000

Keywords

Comments

Another version of Pascal's triangle A007318.
As a triangle read by rows, it is (1,0,0,0,0,0,0,0,0,...) DELTA (0,1,-1,0,0,0,0,0,0,0,0,...) where DELTA is the operator defined in A084938 and it is the Riordan array (1/(1-x), x^2/(1-x)). The row sums of this triangle are F(n+1) = A000045(n+1). - Philippe Deléham, Dec 11 2011
As a triangle, binomial(n-k, k) is also the number of ways to add k pierced circles to a path graph P_n so that no two circles share a vertex (see Lemma 3.1 at page 5 in Owad and Tsvietkova). - Stefano Spezia, May 18 2022
For all n >= 0, k >= 0, the k-th homology group of the n-torus H_k(T^n) is the free abelian group of rank T(n,k) = binomial(n,k). See the Math Stack Exchange link below. - Jianing Song, Mar 13 2023

Examples

			Array begins:
  1, 0,  0,  0, 0, 0, ...
  1, 1,  0,  0, 0, 0, ...
  1, 2,  1,  0, 0, 0, ...
  1, 3,  3,  1, 0, 0, ...
  1, 4,  6,  4, 1, 0, ...
  1, 5, 10, 10, 5, 1, ...
As a triangle, this begins:
  1;
  1, 0;
  1, 1,  0;
  1, 2,  0, 0;
  1, 3,  1, 0, 0;
  1, 4,  3, 0, 0, 0;
  1, 5,  6, 1, 0, 0, 0;
  1, 6, 10, 4, 0, 0, 0, 0;
  ...
		

Crossrefs

The official entry for Pascal's triangle is A007318. See also A026729 (the same array read by downward antidiagonals).
As a triangle without zeros: A011973.

Programs

  • Magma
    /* As triangle */ [[Binomial(n-k,k): k in [0..n]]: n in [0.. 15]]; // Vincenzo Librandi, Feb 08 2017
  • Maple
    with(combinat): for s from 0 to 20 do for n from s to 0 by -1 do printf(`%d,`, binomial(n, s-n)) od:od: # James Sellers, Mar 17 2000
  • Mathematica
    Flatten[ Table[ Binomial[n-k , k], {n, 0, 13}, {k, 0, n}]]  (* Jean-François Alcover, Dec 05 2012 *)
  • PARI
    T(n,k) = binomial(n,k) \\ Charles R Greathouse IV, Feb 07 2017
    

Formula

As a triangle: T(n,k) = A026729(n,n-k).
G.f. of the triangular version: 1/(1-x-x^2*y). - R. J. Mathar, Aug 11 2015

A054123 Right Fibonacci row-sum array T(n,k), n >= 0, 0<=k<=n.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 3, 2, 1, 1, 1, 4, 4, 2, 1, 1, 1, 5, 7, 4, 2, 1, 1, 1, 6, 11, 8, 4, 2, 1, 1, 1, 7, 16, 15, 8, 4, 2, 1, 1, 1, 8, 22, 26, 16, 8, 4, 2, 1, 1, 1, 9, 29, 42, 31, 16, 8, 4, 2, 1, 1, 1, 10, 37, 64, 57, 32, 16, 8, 4, 2, 1, 1, 1, 11, 46, 93, 99, 63, 32, 16, 8, 4, 2, 1, 1, 1, 12, 56
Offset: 0

Views

Author

Keywords

Comments

Variant of A052509 with an additional diagonal of 1's. - R. J. Mathar, Oct 12 2011
Starting with g(0) = {0}, generate g(n) for n > 0 inductively using these rules:
(1) if x is in g(n-1), then x + 1 is in g(n); and
(2) if x is in g(n-1) and x < 2, then x/2 is in g(n).
Then g(1) = {1/1}, g(2) = {1/2,2/1}, g(3) = {1/4,3/2,3/1}, etc. The denominators in g(n) are 2^0, 2^1, ..., 2^(n-1), and T(n,k) is the number of occurrences of 2^(n-1-k), for k = 0..n-1. - Clark Kimberling, Nov 09 2015
G.f.: Sum_{n>=0, 0<=k<=n} T(n,k) * x^n * y^k = (1-x^2*y) / ((1-x*y)*(1-x-x^2*y)). - Jianing Song, May 30 2022

Examples

			Rows:
1
1 1
1 1 1
1 2 1 1
1 3 2 1 1
1 4 4 2 1 1
1 5 7 4 2 1 1
		

Crossrefs

Reflection of array in A054124 about vertical central line.
Row sums: 1, 2, 3, 5, 8, 13, ... (Fibonacci numbers, A000045). Central numbers: 1, 1, 2, 4, 8, ... (binary powers, A000079). Cf. A011973.
Cf. A129713.

Programs

  • Haskell
    a054123 n k = a054123_tabl !! n !! k
    a054123_row n = a054123_tabl !! n
    a054123_tabl = [1] : [1, 1] : f [1] [1, 1] where
       f us vs = ws : f vs ws where
                 ws = zipWith (+) (0 : init us ++ [0, 0]) (vs ++ [1])
    -- Reinhard Zumkeller, May 26 2015
    
  • Mathematica
    Clear[t]; t[n_, k_] := t[n, k] = If[k == 0 || k == n || k == n-1, 1, t[n-1, k] + t[n-2, k-1]]; Table[t[n, k], {n, 0, 13}, {k, 0, n}] // Flatten (* Jean-François Alcover, Feb 01 2013 *)
  • PARI
    A052509(n,k) = sum(m=0, k, binomial(n-k, m));
    T(n,k) = if(k==n, 1, A052509(n-1,k)) \\ Jianing Song, May 30 2022

Formula

T(n, 0) = T(n, n) = 1 for n >= 0; T(n, n-1) = 1 for n >= 1; T(n, k) = T(n-1, k) + T(n-2, k-1) for k=1, 2, ..., n-2, n >= 3. [Corrected by Jianing Song, May 30 2022]
T(n, k) = T(n-1, k-1) + U(n-1, k) for k=1, 2, ..., floor(n/2), n >= 3, array U as in A011973.

Extensions

More terms from Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Apr 05 2003

A264200 Numerator of sum of numbers in set g(n) generated as in Comments.

Original entry on oeis.org

0, 1, 5, 19, 69, 235, 789, 2603, 8533, 27819, 90453, 293547, 951637, 3082923, 9983317, 32320171, 104617301, 338602667, 1095849301, 3546458795, 11477013845, 37141260971, 120193373525, 388957383339, 1258699445589, 4073250794155, 13181344109909, 42655780874923
Offset: 0

Views

Author

Clark Kimberling, Nov 09 2015

Keywords

Comments

Starting with g(0) = {0}, generate g(n) for n > 0 inductively using these rules:
(1) if x is in g(n-1), then x + 1 is in g(n); and
(2) if x is in g(n-1) and x < 2, then x/2 is in g(n).
The sum of numbers in g(n) is a(n)/2^(n-1).

Examples

			g(0) = {0}, sum = 0.
g(1) = {1}, sum = 1.
g(2) = {1/2,2/1}, sum = 5/4.
g(3) = {1/4,3/2,3/1}, sum = 19/8.
		

Crossrefs

Programs

  • Mathematica
    z = 30; x = 1/2; g[0] = {0}; g[1] = {1};
    g[n_] := g[n] = Union[1 + g[n - 1], (1/2) Select[g[n - 1], # < 2 &]]
    Table[g[n], {n, 0, z}]; Table[Total[g[n]], {n, 0, z}]
    Numerator[Table[Total[g[n]], {n, 0, z}] ]

Formula

Conjecture: a(n) = 3*a(n-1) + 4*a(n-2) - 8*a(n-3) - 8*a(n-4).
Showing 1-5 of 5 results.