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 10 results.

A134060 Triangle T(n,k) = A124927(n,k) + A134058(n,k) - A007318(n,k), read by rows.

Original entry on oeis.org

1, 2, 3, 2, 6, 3, 2, 9, 9, 3, 2, 12, 18, 12, 3, 2, 15, 30, 30, 15, 3, 2, 18, 45, 60, 45, 18, 3, 2, 21, 63, 105, 105, 63, 21, 3, 2, 24, 84, 168, 210, 168, 84, 24, 3, 2, 27, 108, 252, 378, 378, 252, 108, 27, 3
Offset: 0

Views

Author

Gary W. Adamson, Oct 05 2007

Keywords

Examples

			First few rows of the triangle are:
  1;
  2,  3;
  2,  6,  3;
  2,  9,  9,  3;
  2, 12, 18, 12,  3;
  2, 15, 30, 30, 15, 3;
  ...
		

Crossrefs

Cf. A007318, A052940 (row sums), A127927, A134058.

Programs

  • Magma
    [1] cat [k eq 0 select 2 else 3*Binomial(n,k): k in [0..n], n in [1..12]]; // G. C. Greubel, May 03 2021
    
  • Mathematica
    Table[3*Binomial[n, k] -Boole[k==0] -Boole[n==0], {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, May 03 2021 *)
  • Sage
    def A134060(n,k): return 3*binomial(n,k) -bool(k==0) -bool(n==0)
    flatten([[A134060(n,k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, May 03 2021

Formula

T(n,k) = A124927(n,k) + A134058(n,k) - A007318(n,k) as infinite lower triangular matrices.
Sum_{k=0..n} T(n, k) = A052940(n).
T(n, k) = 3*binomial(n,k) - [k=0] - [n=0]. - G. C. Greubel, May 03 2021

A135087 Triangle T(n, k) = 2*A134058(n, k) - 1, read by rows.

Original entry on oeis.org

1, 3, 3, 3, 7, 3, 3, 11, 11, 3, 3, 15, 23, 15, 3, 3, 19, 39, 39, 19, 3, 3, 23, 59, 79, 59, 23, 3, 3, 27, 83, 139, 139, 83, 27, 3, 3, 31, 111, 223, 279, 223, 111, 31, 3, 3, 35, 143, 335, 503, 503, 335, 143, 35, 3
Offset: 0

Views

Author

Gary W. Adamson, Nov 18 2007

Keywords

Examples

			First few rows of the triangle are:
  1;
  3,  3;
  3,  7,  3;
  3, 11, 11,  3;
  3, 15, 23, 15,  3;
  3, 19, 39, 39, 19,  3;
  3, 23, 59, 79, 59, 23, 3;
  ...
		

Crossrefs

Programs

  • Magma
    [1] cat [4*Binomial(n,k) -1: k in [0..n], n in [1..12]]; // G. C. Greubel, May 03 2021
    
  • Mathematica
    Table[4*Binomial[n, k] -2*Boole[n==0] -1, {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, May 03 2021 *)
  • Sage
    def A135087(n,k): return 4*binomial(n,k) -2*bool(n==0) -1
    flatten([[A135087(n,k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, May 03 2021

Formula

T(n, k) = 2*A134058(n, k) - 1.
From G. C. Greubel, May 03 2021: (Start)
T(n, k) = 4*binomial(n, k) - 2*[n=0] - 1.
Sum_{k=0..n} T(n, k) = 2^(n+2) - (n + 1 + 2*[n=0]) = A095768(n) - 2*[n=0]. (End)

A046055 Orders of finite Abelian groups having the incrementally largest numbers of nonisomorphic forms (A046054).

Original entry on oeis.org

1, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 221184, 262144, 442368, 524288, 663552, 884736, 995328, 1048576, 1327104, 1769472, 1990656, 2097152, 2654208, 3538944, 3981312, 4194304
Offset: 1

Views

Author

Keywords

Comments

Different from A151821, but often confused with it.
Nicolas used the notation a(n) for the number of Abelian groups of order n (A000688) and named these numbers a-highly composite numbers (a-hautement composés). - Amiram Eldar, Aug 20 2019

Crossrefs

Warning: this is different from A151821.

Programs

  • Mathematica
    aa = {}; max = 0; Do[If[FiniteAbelianGroupCount[n] > max, max = FiniteAbelianGroupCount[n]; AppendTo[aa, n]], {n, 2^22}]; aa (* Artur Jasinski, Oct 06 2011 *)

Formula

Warning: the g.f. is not x*(1+2*x)/(1-2*x), as claimed earlier.
Warning: this is not the binomial transform of A010684, as claimed earlier.
Warning: this is not the row sums of either A131127 or A134058, as claimed earlier.

Extensions

More terms from David Wasserman, Feb 06 2002
Many incorrect formulas and assertions deleted by R. J. Mathar, Jul 08 2009
Edited by N. J. A. Sloane, Jul 08 2009

A028326 Twice Pascal's triangle A007318: T(n,k) = 2*C(n,k).

Original entry on oeis.org

2, 2, 2, 2, 4, 2, 2, 6, 6, 2, 2, 8, 12, 8, 2, 2, 10, 20, 20, 10, 2, 2, 12, 30, 40, 30, 12, 2, 2, 14, 42, 70, 70, 42, 14, 2, 2, 16, 56, 112, 140, 112, 56, 16, 2, 2, 18, 72, 168, 252, 252, 168, 72, 18, 2, 2, 20, 90, 240, 420, 504, 420, 240, 90, 20, 2, 2, 22, 110, 330, 660, 924, 924, 660, 330, 110, 22, 2
Offset: 0

Views

Author

Keywords

Comments

Also number of binary vectors of length n+1 with k+1 runs (1 <= k <= n).
If the last two entries in each row are removed and 0 replaces the entries in a checkerboard pattern, we obtain
2;
0, 6;
2, 0, 12;
0, 10, 0, 20;
2, 0, 30, 0, 30;
0, 14, 0, 70, 0, 42;
2, 0, 56, 0, 140, 0, 56;
0, 18, 0, 168, 0, 252, 0, 72;
...
This plays the same role of recurrence coefficients for second differences of polynomials as triangle A074909 plays for the first differences. - R. J. Mathar, Jul 03 2013
From Roger Ford, Jul 06 2023: (Start)
T(n,k) = the number of closed meanders with n top arches, n+1 exterior arches and with k = the number of arches of length 1 - (n+1).
Example of closed meanders with 4 top arches and 5 exterior arches:
exterior arches are top arches or bottom arches without a covering arch
/\ = top arch length 1, \/ = bottom arch length 1
/ \ Top: /\=3 / \ / \ Top: /\=2
/\ / /\ \ /\ / /\ \ / /\ \
\ \/ / \ \/ / Bottom: \/=2 \/ \ \/ / \/ Bottom: /\=3
\/ \/ k=5-5=0 \/ k=5-5=0 T(4,0) = 2
/ \ Top: /\=3 / \ Top: /\=3
/\ / /\ /\ \ / /\ \ /\ /\
\ \/ / \/ \/ Bottom: \/=3 \/ \ \/ \/ / Bottom: \/=3
\/ k=6-5=1 \____/ k=6-5=1
/ \ Top: /\=3 / \ Top: /\=3
/ /\ /\ \ /\ /\ /\ / /\ \
\/ \/ \ \/ / Bottom: \/=3 \ \/ \/ / \/ Bottom: \/=3
\/ k=6-5=1 \____/ k=6-5=1 T(4,1) = 4
/ \ Top: /\=3
/ /\ /\ /\ \ /\ /\ /\ /\ Top: /\=4
\/ \/ \/ \/ Bottom: \/=4 \ \/ \/ \/ / Bottom: ||=3
k=7-5=2 \________/ k=7-5=2 T(4,2) = 2.
(End)

Examples

			Triangle begins:
  2;
  2,  2;
  2,  4,   2;
  2,  6,   6,   2;
  2,  8,  12,   8,   2;
  2, 10,  20,  20,  10,    2;
  2, 12,  30,  40,  30,   12,    2;
  2, 14,  42,  70,  70,   42,   14,    2;
  2, 16,  56, 112, 140,  112,   56,   16,   2;
  2, 18,  72, 168, 252,  252,  168,   72,  18,   2;
  2, 20,  90, 240, 420,  504,  420,  240,  90,  20,   2;
  2, 22, 110, 330, 660,  924,  924,  660, 330, 110,  22,  2;
  2, 24, 132, 440, 990, 1584, 1848, 1584, 990, 440, 132, 24, 2;
		

References

  • I. Goulden and D. Jackson, Combinatorial Enumeration, John Wiley and Sons, 1983, page 76.

Crossrefs

Programs

  • Haskell
    a028326 n k = a028326_tabl !! n !! k
    a028326_row n = a028326_tabl !! n
    a028326_tabl = iterate
       (\row -> zipWith (+) ([0] ++ row) (row ++ [0])) [2]
    -- Reinhard Zumkeller, Mar 12 2012
    
  • Magma
    [2*Binomial(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Apr 27 2021
    
  • Maple
    T := proc(n, k) if k=0 then 2 elif k>n then 0 else T(n-1, k)+T(n-1, k-1) fi end:
    for n from 0 to 13 do seq(T(n, k), k=0..n) od; # Zerinvary Lajos, Dec 16 2006
  • Mathematica
    Table[2*Binomial[n, k], {n, 0, 11}, {k, 0, n}]//Flatten (* Robert G. Wilson v, Mar 05 2012 *)
  • PARI
    T(n,k) = 2*binomial(n,k) \\ Charles R Greathouse IV, Feb 07 2017
    
  • Python
    from sympy import binomial
    def T(n, k):
        return 2*binomial(n, k)
    for n in range(21): print([T(n, k) for k in range(n + 1)]) # Indranil Ghosh, Apr 29 2017
    
  • Sage
    flatten([[2*binomial(n,k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Apr 27 2021

Formula

G.f. for the number of length n binary words with k runs: (1-x+x*y)/(1-x-x*y) [Goulden and Jackson]. - Geoffrey Critzer, Mar 04 2012

Extensions

More terms from Donald Manchester, Jr. (s1199170(AT)cedarnet.cedarville.edu)

A134059 Triangle T(n, k) = 3*binomial(n,k) with T(0, 0) = 1, read by rows.

Original entry on oeis.org

1, 3, 3, 3, 6, 3, 3, 9, 9, 3, 3, 12, 18, 12, 3, 3, 15, 30, 30, 15, 3, 3, 18, 45, 60, 45, 18, 3, 3, 21, 63, 105, 105, 63, 21, 3, 3, 24, 84, 168, 210, 168, 84, 24, 3, 3, 27, 108, 252, 378, 378, 252, 108, 27, 3
Offset: 0

Views

Author

Gary W. Adamson, Oct 05 2007

Keywords

Comments

Triangle T(n,k), 0 <= k <= n, read by rows given by [3, -2, 0, 0, 0, 0, 0, ...] DELTA [3, -2, 0, 0, 0, 0, 0, ...] where DELTA is the operator defined in A084938. - Philippe Deléham, Oct 07 2007

Examples

			First few rows of the triangle:
  1;
  3,  3;
  3,  6,  3;
  3,  9,  9,  3;
  3, 12, 18, 12,  3;
  3, 15, 30, 30, 15,  3;
  3, 18, 45, 60, 45, 18,  3;
  ...
		

Crossrefs

Cf. A007318, A082505 (row sums), A084938, A134058.

Programs

  • Magma
    A134059:= func< n,k | n eq 0 select 1 else 3*Binomial(n,k) >;
    [A134059(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Apr 26 2021
    
  • Mathematica
    Join[{1},Rest[Flatten[Table[3Binomial[n,k],{n,0,10},{k,0,n}]]]] (* Harvey P. Dale, Feb 15 2014 *)
    Table[3*Binomial[n,k] -2*Boole[n==0], {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, Apr 26 2021 *)
  • Sage
    def A134059(n,k): return 3*binomial(n,k) - 2*bool(n==0)
    flatten([[A134059(n,k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Apr 26 2021

Formula

3*Pascal's triangle A007318, then replace T(0,0) with 1.
G.f.: Sum_{n>=0} Sum_{k>=0} T(n,k) *x^n * y^k = 1 - 3*(1+y)*x/(x+x*y-1). - R. J. Mathar, Feb 19 2020
From G. C. Greubel, Apr 27 2021: (Start)
T(n, k) = 3*binomial(n,k) - 2*[n=0].
Sum_{k=0..n} T(n, k) = 3*2^n - 2*[n=0] = A082505(n+1). (End)
E.g.f.: 3*exp(x*(1+y)) - 2. - Stefano Spezia, Apr 03 2024

Extensions

Title changed by G. C. Greubel, Apr 26 2021

A132200 Numbers in (4,4)-Pascal triangle .

Original entry on oeis.org

1, 4, 4, 4, 8, 4, 4, 12, 12, 4, 4, 16, 24, 16, 4, 4, 20, 40, 40, 20, 4, 4, 24, 60, 80, 60, 24, 4, 4, 28, 84, 140, 140, 84, 28, 4, 4, 32, 112, 224, 280, 224, 112, 32, 4, 4, 36, 144, 336, 504, 504, 336, 144, 36, 4, 4, 40, 180, 480, 840, 1008, 840, 480, 180, 40, 4
Offset: 0

Views

Author

Philippe Deléham, Nov 19 2007

Keywords

Comments

This triangle belongs to the family of (x,y)-Pascal triangles ; other triangles arise by choosing different values for (x,y): (1,1) -> A007318 ; (1,0) -> A071919 ; (3,2) -> A029618 ; (2,2) -> A134058 ; (-1,1) -> A112467 ; (0,1) -> A097805 ; (5,5) -> A135089 ; etc..

Examples

			Triangle begins:
  1;
  4,  4;
  4,  8,  4;
  4, 12, 12,  4;
  4, 16, 24, 16,  4;
  4, 20, 40, 40, 20, 4;
		

Crossrefs

Programs

  • Magma
    [1] cat [4*Binomial(n,k): k in [0..n], n in [1..12]]; // G. C. Greubel, May 03 2021
    
  • Mathematica
    Table[4*Binomial[n,k] -3*Boole[n==0], {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, May 03 2021 *)
  • Sage
    def A132200(n,k): return 4*binomial(n,k) - 3*bool(n==0)
    flatten([[A132200(n,k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, May 03 2021

Formula

T(n,k) = 4*binomial(n,k), n>0 ; T(0,0)=1.
Sum_{k=0..n} T(n,k) = 2^(n+2) - 3*[n=0]. - G. C. Greubel, May 03 2021

A136521 Triangle read by rows: (1, 2, 2, 2, ...) on the main diagonal and the rest zeros.

Original entry on oeis.org

1, 0, 2, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2
Offset: 0

Views

Author

Gary W. Adamson, Jan 02 2008

Keywords

Examples

			First few rows of the triangle are:
  1;
  0, 2;
  0, 0, 2;
  0, 0, 0, 2;
  0, 0, 0, 0, 2;
  ...
		

Crossrefs

Programs

  • Mathematica
    Table[2*Boole[k==n] -Boole[n==0], {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, May 03 2021 *)
  • Sage
    flatten([[2*bool(k==n) -bool(n==0) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, May 03 2021

Formula

By columns, (1, 0, 0, 0, ...) in leftmost column; all others are (2, 0, 0, 0, ...).
By rows, row 1 = 1, others = (n-1) zeros followed by "2".
A007318(n,k) * T(n,k) = A124927(n,k).
T(n,k) * A007318(n,k) = A134058(n,k).
A001263(n,k) * T(n,k) = A136522(n,k).
From G. C. Greubel, May 03 2021: (Start)
T(n, k) = 2*[k=n] - [n=0].
Sum_{k=0..n} T(n, k) = A040000(n). (End)

Extensions

More terms added by G. C. Greubel, May 03 2021

A173048 Triangle T(n, k) = [x^k](p(x, n, q)) where p(x,n,q) = Product_{j=1..n} (x + q^j) + Product_{j=1..n} (x*q^j + 1), p(x, 0, q) = 1, and q = 2, read by rows.

Original entry on oeis.org

1, 3, 3, 9, 12, 9, 65, 70, 70, 65, 1025, 990, 560, 990, 1025, 32769, 31806, 11160, 11160, 31806, 32769, 2097153, 2064510, 671832, 178560, 671832, 2064510, 2097153, 268435457, 266338558, 87413592, 12850368, 12850368, 87413592, 266338558, 268435457
Offset: 0

Views

Author

Roger L. Bagula, Feb 08 2010

Keywords

Examples

			Triangle begins as:
        1;
        3,       3;
        9,      12,      9;
       65,      70,     70,     65;
     1025,     990,    560,    990,   1025;
    32769,   31806,  11160,  11160,  31806,   32769;
  2097153, 2064510, 671832, 178560, 671832, 2064510, 2097153;
		

Crossrefs

Cf. A134058 (q=1), this sequence (q=2), A173049 (q=3).

Programs

  • Magma
    R:=PowerSeriesRing(Integers(), 50);
    p:= func< x,n,q | n eq 0 select 1 else (&*[x+q^j: j in [1..n]]) + (&*[1+q^j*x: j in [1..n]]) >;
    T:= func< n,q | Coefficients(R!( p(x,n,q) )) >;
    [T(n,2): n in [0..10]]; // G. C. Greubel, Apr 26 2021
  • Mathematica
    p[x_, n_, q_]:= If[n==0, 1, Product[x+q^j, {j,n}] + Product[x*q^j +1, {j,n}]];
    T[n_, k_, q_]:= SeriesCoefficient[p[x,n,q], {x,0,k}];
    Table[T[n,k,2], {n,0,10}, {k,0,n}]//Flatten (* modified by G. C. Greubel, Apr 26 2021 *)

Formula

T(n, k) = [x^k](p(x, n, q)) where p(x,n,q) = Product_{j=1..n} (x + q^j) + Product_{j=1..n} (x*q^j + 1), p(x, 0, q) = 1, and q = 2.

Extensions

Edited by G. C. Greubel, Apr 26 2021

A173049 Triangle T(n, k) = [x^k](p(x, n, q)) where p(x,n,q) = Product_{j=1..n} (x + q^j) + Product_{j=1..n} (x*q^j + 1), p(x, 0, q) = 1, and q = 3, read by rows.

Original entry on oeis.org

1, 4, 4, 28, 24, 28, 730, 390, 390, 730, 59050, 29280, 7020, 29280, 59050, 14348908, 7145292, 914760, 914760, 7145292, 14348908, 10460353204, 5223003240, 650485836, 49397040, 650485836, 5223003240, 10460353204, 22876792454962, 11433166054158, 1427188022442, 55340738838, 55340738838, 1427188022442, 11433166054158, 22876792454962
Offset: 0

Views

Author

Roger L. Bagula, Feb 08 2010

Keywords

Examples

			Triangle begins as:
            1;
            4,          4;
           28,         24,        28;
          730,        390,       390,      730;
        59050,      29280,      7020,    29280,     59050;
     14348908,    7145292,    914760,   914760,   7145292,   14348908;
  10460353204, 5223003240, 650485836, 49397040, 650485836, 5223003240, 10460353204;
		

Crossrefs

Cf. A134058 (q=1), A173048 (q=2), this sequence (q=3).

Programs

  • Magma
    R:=PowerSeriesRing(Integers(), 50);
    p:= func< x,n,q | n eq 0 select 1 else (&*[x+q^j: j in [1..n]]) + (&*[1+q^j*x: j in [1..n]]) >;
    T:= func< n,q | Coefficients(R!( p(x,n,q) )) >;
    [T(n,3): n in [0..10]]; // G. C. Greubel, Apr 26 2021
  • Mathematica
    p[x_, n_, q_]:= If[n==0, 1, Product[x+q^j, {j,n}] + Product[x*q^j +1, {j,n}]];
    T[n_, k_, q_]:= SeriesCoefficient[p[x,n,q], {x,0,k}];
    Table[T[n, k, 3], {n,0,10}, {k,0,n}]//Flatten (* modified by G. C. Greubel, Apr 26 2021 *)

Formula

T(n, k) = [x^k](p(x, n, q)) where p(x,n,q) = Product_{j=1..n} (x + q^j) + Product_{j=1..n} (x*q^j + 1), p(x, 0, q) = 1, and q = 3.

Extensions

Edited by G. C. Greubel, Apr 26 2021

A135089 Triangle T(n,k) = 5*binomial(n,k) with T(0,0) = 1, read by rows.

Original entry on oeis.org

1, 5, 5, 5, 10, 5, 5, 15, 15, 5, 5, 20, 30, 20, 5, 5, 25, 50, 50, 25, 5, 5, 30, 75, 100, 75, 30, 5, 5, 35, 105, 175, 175, 105, 35, 5, 5, 40, 140, 280, 350, 280, 140, 40, 5, 5, 45, 180, 420, 630, 630, 420, 180, 45, 5, 5, 50, 225, 600, 1050, 1260, 1050, 600, 225, 50, 5
Offset: 0

Views

Author

Gary W. Adamson, Nov 18 2007

Keywords

Comments

Row sums = A020714 (except for the first term).
Triangle T(n,k), 0 <= k <= n, read by rows given by (5, -4, 0, 0, 0, 0, 0, 0, 0, ...) DELTA (5, -4, 0, 0, 0, 0, 0, 0, 0, ...) where DELTA is the operator defined in A084938. - Philippe Deléham, Nov 24 2013

Examples

			First few rows of the triangle:
  1;
  5,  5;
  5, 10,  5;
  5, 15, 15,   5;
  5, 20, 30   20,  5;
  5, 25, 50,  50, 25,  5;
  5, 30, 75, 100, 75, 30, 5.
		

Crossrefs

Programs

  • Magma
    [1] cat [5*Binomial(n,k): k in [0..n], n in [1..12]]; // G. C. Greubel, May 03 2021
    
  • Mathematica
    Table[5*Binomial[n,k] -4*Boole[n==0], {n, 0, 12}, {k, 0, n}]//Flatten (* G. C. Greubel, Sep 22 2016; May 03 2021 *)
  • Sage
    def A135089(n,k): return 5*binomial(n,k) - 4*bool(n==0)
    flatten([[A135089(n,k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, May 03 2021

Formula

T(n,k) = 5*binomial(n,k), n > 0, 0 <= k <= n.
Equals 2*A134059(n,k) - A007318(n,k).
G.f.: (1+4*x+4*x*y)/(1-x-x*y). - Philippe Deléham, Nov 24 2013
Sum_{k=0..n} T(n,k) = A020714(n) - 4*[n=0]. - G. C. Greubel, May 03 2021
Showing 1-10 of 10 results.