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 12 results. Next

A161161 Irregular triangle of differences T(n,k) = A083906(n,k) - A083906(n-1,k) of q-Binomial coefficients.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 1, 2, 3, 1, 1, 1, 2, 3, 5, 2, 2, 1, 1, 2, 3, 5, 7, 5, 4, 3, 1, 1, 1, 2, 3, 5, 7, 11, 8, 9, 7, 6, 2, 2, 1, 1, 2, 3, 5, 7, 11, 15, 14, 15, 15, 13, 11, 7, 4, 3, 1, 1, 1, 2, 3, 5, 7, 11, 15, 22, 21, 25, 25, 27, 23, 22, 15, 13, 8, 6, 2, 2, 1, 1, 2, 3, 5, 7, 11, 15, 22, 30, 32, 37, 42, 44
Offset: 1

Views

Author

Alford Arnold, Jun 04 2009

Keywords

Examples

			The differences between 5 3 4 3 1 and 4 2 2 yield row four : 1 1 2 3 1.
Triangle begins:
  1;
  1, 1;
  1, 1, 2;
  1, 1, 2, 3, 1;
  1, 1, 2, 3, 5, 2,  2;
  1, 1, 2, 3, 5, 7,  5,  4,  3,  1;
  1, 1, 2, 3, 5, 7, 11,  8,  9,  7,  6,  2,  2;
  1, 1, 2, 3, 5, 7, 11, 15, 14, 15, 15, 13, 11,  7,  4,  3,  1;
  1, 1, 2, 3, 5, 7, 11, 15, 22, 21, 25, 25, 27, 23, 22, 15, 13, 8, 6, 2, 2;
  ...
		

Crossrefs

Cf. A000079 (row sums), A002865 (antidiagonal sums), A077957 (alternating row sums).

Programs

  • Magma
    R:=PowerSeriesRing(Rationals(), 100);
    qBinom:= func< n,k,x | n eq 0 or k eq 0 select 1 else (&*[(1-x^(n-j))/(1-x^(j+1)): j in [0..k-1]]) >;
    A083906:= func< n,k | Coefficient(R!( (&+[qBinom(n,k,x): k in [0..n]]) ), k) >;
    A161161:= func< n,k | A083906(n,k) - A083906(n-1,k) >;
    [A161161(n,k): k in [0..Floor(n^2/4)], n in [1..12]]; // G. C. Greubel, Feb 13 2024
    
  • Maple
    A161161 := proc(n,m)
         A083906(n,m)-A083906(n-1,m) ;
    end proc:
    for n from 0 to 10 do
         for k from 0 to A033638(n)-1 do
             printf("%d, ", A161161(n, k)) ;
         od:
    od: # R. J. Mathar, Jul 13 2012
  • Mathematica
    b[n_, k_] := b[n, k] = SeriesCoefficient[Sum[QBinomial[n, m, q], {m, 0, n}], {q, 0, k}];
    T[n_, k_] := b[n, k] - b[n - 1, k];
    Table[Table[T[n, k], {k, 0, n^2/4}], {n, 1, 10}] // Flatten (* Jean-François Alcover, Nov 25 2017 *)
  • SageMath
    def t(n, k): # t = A083906
        if k<0 or k> (n^2//4): return 0
        elif n<2 : return n+1
        else: return 2*t(n-1, k) - t(n-2, k) + t(n-2, k-n+1)
    def A161161(n,k): return t(n, k) - t(n-1, k)
    flatten([[A161161(n, k) for k in range(int(n^2//4)+1)] for n in range(1,13)]) # G. C. Greubel, Feb 13 2024

Formula

Sum_{k=0..floor(n^2/4)} T(n, k) = A000079(n-1) (row sums).
Sum_{k=0..(n+2 - ceiling(sqrt(4*n)))} T(n-k, k) = A002865(n+1) (antidiagonal sums).
Sum_{k=0..floor(n^2/4)} (-1)^k*T(n, k) = A077957(n-1). - G. C. Greubel, Feb 13 2024

A006116 Sum of Gaussian binomial coefficients [n,k] for q=2 and k=0..n.

Original entry on oeis.org

1, 2, 5, 16, 67, 374, 2825, 29212, 417199, 8283458, 229755605, 8933488744, 488176700923, 37558989808526, 4073773336877345, 623476476706836148, 134732283882873635911, 41128995468748254231002, 17741753171749626840952685, 10817161765507572862559462656
Offset: 0

Views

Author

Keywords

Comments

Also number of distinct binary linear codes of length n and any dimension.
Equivalently, number of subgroups of the Abelian group (C_2)^n.
Let V_n be an n-dimensional vector space over a field with 2 elements. Let P(V_n) be the collection of all subspaces of V_n. Then a(n-1) is the number of times any given nonzero vector of V_n appears in P(V_n). - Geoffrey Critzer, Jun 05 2017
With V_n and P(V_n) as above, a(n) is also the cardinality of P(V_n). - Vaia Patta, Jun 25 2019

Examples

			O.g.f.: A(x) = 1/(1-x) + x/((1-x)*(1-2x)) + x^2/((1-x)*(1-2x)*(1-4x)) + x^3/((1-x)*(1-2x)*(1-4x)*(1-8x)) + ...
Also generated by iterated binomial transforms in the following way:
[1,2,5,16,67,374,2825,29212,...] = BINOMIAL([1,1,2,6,26,158,1330,...]); see A135922;
[1,2,6,26,158,1330,15414,245578,...] = BINOMIAL([1,1,3,13,83,749,...]);
[1,3,13,83,749,9363,160877,...] = BINOMIAL^2([1,1,5,33,317,4361,...]);
[1,5,33,317,4361,82789,2148561,...] = BINOMIAL^4([1,1,9,97,1433,...]);
[1,9,97,1433,30545,902601,...] = BINOMIAL^8([1,1,17,321,7601,252833,...]);
etc.
		

References

  • J. Goldman and G.-C. Rota, The number of subspaces of a vector space, pp. 75-83 of W. T. Tutte, editor, Recent Progress in Combinatorics. Academic Press, NY, 1969.
  • I. P. Goulden and D. M. Jackson, Combinatorial Enumeration. Wiley, NY, 1983, p. 99.
  • F. J. MacWilliams and N. J. A. Sloane, The Theory of Error-Correcting Codes, Elsevier-North Holland, 1978, p. 698.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • M. Sved, Gaussians and binomials, Ars. Combinatoria, 17A (1984), 325-351.

Crossrefs

Cf. A006516. Row sums of A022166.
Cf. A005329, A083906. - Paul D. Hanna, Nov 29 2008

Programs

  • Magma
    I:=[1,2]; [n le 2 select I[n] else 2*Self(n-1)+(2^(n-2)-1)*Self(n-2): n in [1..20]]; // Vincenzo Librandi, Aug 12 2014
  • Maple
    gf:= m-> add(x^n/mul(1-2^k*x, k=0..n), n=0..m):
    a:= n-> coeff(series(gf(n), x, n+1), x, n):
    seq(a(n), n=0..20);  # Alois P. Heinz, Apr 24 2012
    # second Maple program:
    b:= proc(n, m) option remember; `if`(n=0, 1,
          2^m*b(n-1, m)+b(n-1, m+1))
        end:
    a:= n-> b(n, 0):
    seq(a(n), n=0..25);  # Alois P. Heinz, Aug 08 2021
  • Mathematica
    faq[n_, q_] = Product[(1-q^(1+k))/(1-q), {k, 0, n-1}]; qbin[n_, m_, q_] = faq[n, q]/(faq[m, q]*faq[n-m, q]); a[n_] := Sum[qbin[n, k, 2], {k, 0, n}]; a /@ Range[0, 19] (* Jean-François Alcover, Jul 21 2011 *)
    Flatten[{1, RecurrenceTable[{a[n]==2*a[n-1]+(2^(n-1)-1)*a[n-2], a[0]==1, a[1]==2}, a, {n,1,15}]}] (* Vaclav Kotesovec, Aug 21 2013 *)
    QP = QPochhammer; a[n_] := Sum[QP[2, 2, n]/(QP[2, 2, k]*QP[2, 2, n-k]), {k, 0, n}]; Table[a[n], {n, 0, 20}] (* Jean-François Alcover, Nov 23 2015 *)
    Table[Sum[QBinomial[n, k, 2], {k, 0, n}], {n, 0, 19}] (* Ivan Neretin, Mar 28 2016 *)
  • PARI
    a(n)=polcoeff(sum(k=0, n, x^k/prod(j=0, k, 1-2^j*x+x*O(x^n))), n) \\ Paul D. Hanna, Dec 06 2007
    
  • PARI
    a(n,q=2)=sum(k=0,n,prod(i=1,n-k,(q^(i+k)-1)/(q^i-1))) \\ Paul D. Hanna, Nov 29 2008
    

Formula

O.g.f.: A(x) = Sum_{n>=0} x^n / Product_{k=0..n} (1 - 2^k*x). - Paul D. Hanna, Dec 06 2007
From Paul D. Hanna, Nov 29 2008: (Start)
Coefficients of the square of the q-exponential of x evaluated at q=2, where the q-exponential of x = Sum_{n>=0} x^n/F(n) and F(n) = Product{i=1..n} (q^i-1)/(q-1) is the q-factorial of n.
G.f.: (Sum_{k=0..n} x^n/F(n))^2 = Sum_{k=0..n} a(n)*x^n/F(n) where F(n) = A005329(n) = Product{i=1..n} (2^i - 1).
a(n) = Sum_{k=0..n} F(n)/(F(k)*F(n-k)) where F(n)=A005329(n) is the 2-factorial of n.
a(n) = Sum_{k=0..n} Product_{i=1..n-k} (2^(i+k) - 1)/(2^i - 1).
a(n) = Sum_{k=0..A033638(n)} A083906(n,k)*2^k. (End)
G.f.: 1 + x*(G(0) - 1)/(x-1) where G(k) = 1 - 1/(1-2^k*x)/(1-x/(x-1/G(k+1) )); (recursively defined continued fraction). - Sergei N. Gladkovskii, Jan 16 2013
a(n) = 2*a(n-1) + (2^(n-1)-1)*a(n-2). [Hitzemann and Hochstattler]. - R. J. Mathar, Aug 21 2013
a(n) ~ c * 2^(n^2/4), where c = EllipticTheta[3,0,1/2] / QPochhammer[1/2,1/2] = 7.3719688014613... if n is even and c = EllipticTheta[2,0,1/2] / QPochhammer[1/2,1/2] = 7.3719494907662... if n is odd. - Vaclav Kotesovec, Aug 21 2013

A029552 Expansion of phi(x) / f(-x) in powers of x where phi(), f() are Ramanujan theta functions.

Original entry on oeis.org

1, 3, 4, 7, 13, 19, 29, 43, 62, 90, 126, 174, 239, 325, 435, 580, 769, 1007, 1313, 1702, 2191, 2808, 3580, 4539, 5735, 7216, 9036, 11278, 14028, 17383, 21474, 26448, 32471, 39759, 48550, 59123, 71829, 87053, 105249, 126975, 152858, 183623
Offset: 0

Views

Author

Keywords

Comments

Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).

Examples

			G.f. = 1 + 3*x + 4*x^2 + 7*x^3 + 13*x^4 + 19*x^5 + 29*x^6 + 43*x^7 + ...
G.f. = 1/q + 3*q^23 + 4*q^47 + 7*q^71 + 13*q^95 + 19*q^119 + 29*q^143 + ...
		

Crossrefs

Programs

  • Mathematica
    a[ n_] := SeriesCoefficient[ EllipticTheta[ 3, 0, q] / QPochhammer[ q], {q, 0, n}]; (* Michael Somos, Oct 29 2013 *)
    a[ n_] := SeriesCoefficient[ QPochhammer[ -q, q^2]^2 / QPochhammer[ q, q^2], {q, 0, n}]; (* Michael Somos, Oct 29 2013 *)
  • PARI
    {a(n) = if( n<0, 0, polcoeff( sum(k=1, sqrtint(n), 2*x^k^2, 1) / eta(x + x * O(x^n)), n))}; /* Michael Somos, Sep 17 2004 */
    
  • PARI
    {a(n) = my(A); if( n<0, 0, A = x * O(x^n); polcoeff( eta(x^2 + A)^5 / (eta(x + A)^3 * eta(x^4 + A)^2), n));} /* Michael Somos, Sep 17 2004 */
    
  • PARI
    {a(n) = if( n<0, 0, polcoeff( sum(k=0, 2*n, prod(i=1, k, (1 -x^(2*n + 1-i)) / (1 - x^i))), n^2-n))}; /* Michael Somos, Sep 17 2004 */

Formula

Expansion of q^(1/24) * eta(q^2)^5 /(eta(q)^3 * eta(q^4)^2) in powers of q. - Michael Somos, Sep 17 2004
Euler transform of period 4 sequence [3, -2, 3, 0, ...]. - Michael Somos, Sep 17 2004
G.f. A(x) is the limit of x^(n^2) P_{2n}(1/x) where P_n(q) = Sum_{k=0..n} C(n,k;q) and C(n,k;q) is q-binomial coefficients. See A083906 for P_n. - Michael Somos, Sep 17 2004
G.f.: (1 + 2 * Sum_{k>0} x^(k^2)) / (Product_{k>0} (1 - x^k)).
a(n) ~ exp(sqrt(2*n/3)*Pi) / (2^(7/4)*3^(1/4)*n^(3/4)). - Vaclav Kotesovec, May 01 2017
Expansion of chi(x)^3/chi(-x^2) = chi(x)^2/chi(-x) = chi(-x^2)^2/chi(-x)^3 in powers of x where chi() is a Ramanujan theta function. - Michael Somos, Apr 24 2023

A083479 The natural numbers with all terms of A033638 inserted.

Original entry on oeis.org

0, 1, 1, 1, 2, 2, 3, 3, 4, 5, 5, 6, 7, 7, 8, 9, 10, 10, 11, 12, 13, 13, 14, 15, 16, 17, 17, 18, 19, 20, 21, 21, 22, 23, 24, 25, 26, 26, 27, 28, 29, 30, 31, 31, 32, 33, 34, 35, 36, 37, 37, 38, 39, 40, 41, 42, 43, 43, 44, 45, 46, 47, 48, 49, 50, 50, 51, 52, 53, 54, 55, 56, 57, 57
Offset: 0

Views

Author

Alford Arnold, Jun 08 2003

Keywords

Comments

Row n of A049597 has a(n+1) nonzero values.
When considering the set of nested parabolas defined by -(x^2) + p*x for integer values of p, a(n) tells us how many parabolas are intersected by the line from (1,n) to (n,n). - Gregory R. Bryant, Apr 01 2013
Number of distinct perimeters for polyominoes with n square cells. - Wesley Prosser, Sep 06 2017

Examples

			There are three 1's, one from the natural numbers and two from A033638.
When viewed as an array the sequence begins:
   0
   1
   1  1
   2  2
   3  3  4
   5  5  6
   7  7  8  9
  10 10 11 12
  13 13 14 15 16
  17 17 18 19 20
  21 21 22 23 24 25
  26 26 27 28 29 30
  ...
		

Crossrefs

Programs

  • Haskell
    a083479 n = a083479_list !! n
    a083479_list = m [0..] a033638_list where
       m xs'@(x:xs) ys'@(y:ys) | x <= y    = x : m xs ys'
                               | otherwise = y : m xs' ys
    -- Reinhard Zumkeller, Apr 06 2012
    
  • Magma
    [n eq 0 select 0 else (n+2)-Ceiling(Sqrt(4*n)): n in [0..100]]; // G. C. Greubel, Feb 17 2024
    
  • Mathematica
    Table[(n + 2) - Ceiling@ Sqrt[4 n] - 2 Boole[n == 0], {n, 0, 73}] (* Michael De Vlieger, Sep 05 2017 *)
  • Maxima
    a(n):=((n+2)-ceiling(sqrt(4*n))); /* Gregory R. Bryant, Apr 01 2013 */
    
  • Python
    from math import isqrt
    def A083479(n): return n+1-isqrt((n<<2)-1) if n else 0 # Chai Wah Wu, Jul 28 2022
    
  • SageMath
    [(n+2)-ceil(sqrt(4*n)) -2*int(n==0) for n in range(101)] # G. C. Greubel, Feb 17 2024

Formula

a(n) = (n+2) - ceiling(sqrt(4*n)), for n > 0. - Gregory R. Bryant, Apr 01 2013
From Wesley Prosser, Sep 06 2017: (Start)
a(n) = (n+2) - A027709(n)/2.
a(n) = (n+2) - A027434(n).
a(n) = (2n+2) - A049068(n).
a(n) = (2n+3) - A080037(n).
(End)

Extensions

Edited and extended by David Wasserman, Nov 16 2004

A098613 Expansion of psi(x^2) / f(-x) in powers of x where psi(), f() are Ramanujan theta functions.

Original entry on oeis.org

1, 1, 3, 4, 7, 10, 17, 23, 35, 48, 69, 93, 131, 173, 236, 310, 413, 536, 704, 903, 1170, 1489, 1904, 2403, 3044, 3811, 4784, 5951, 7409, 9157, 11325, 13912, 17095, 20891, 25519, 31029, 37708, 45632, 55184, 66495, 80050, 96064, 115173, 137680, 164425, 195860
Offset: 0

Views

Author

Michael Somos, Sep 17 2004

Keywords

Comments

Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).
This sequence convolved with A000009 gives A001936. - Gary W. Adamson, Mar 24 2011
a(n) is the number of partitions of n in which each odd part can occur any number of times but each even part is of two kinds and each kind can occur at most once. - Michael Somos, Dec 01 2019

Examples

			G.f. = 1 + x + 3*x^2 + 4*x^3 + 7*x^4 + 10*x^5 + 17*x^6 + 23*x^7 + ...
G.f. = q^5 + q^29 + 3*q^53 + 4*q^77 + 7*q^101 + 10*q^125 + 17*q^149 + ...
		

Crossrefs

Programs

  • Mathematica
    a[ n_] := SeriesCoefficient[ EllipticTheta[ 2, 0, x] / (2 x^(1/4) QPochhammer[ x]), {x, 0, n}]; (* Michael Somos, Oct 29 2013 *)
    a[ n_] := SeriesCoefficient[ 1 / (QPochhammer[ x, x^2] QPochhammer[ x^2, x^4]^2), {x, 0, n}]; (* Michael Somos, Oct 29 2013 *)
    nmax = 40; CoefficientList[ Series[Product[(1 + x^k) * (1 + x^(2*k))^2, {k, 1, nmax}], {x, 0, nmax}], x] (* Vaclav Kotesovec, Sep 07 2015 *)
    a[ n_] := SeriesCoefficient[ QPochhammer[ -x, x^2] QPochhammer[ -x^2, x^2]^3, {x, 0, n}]; (* Michael Somos, Sep 07 2015 *)
    a[ n_] := SeriesCoefficient[ QPochhammer[ x, -x]^2 QPochhammer[ -x, x]^3, {x, 0, n}]; (* Michael Somos, Sep 07 2015 *)
    a[ n_] := SeriesCoefficient[ QPochhammer[ -x, x] QPochhammer[ -x^2, x^2]^2, {x, 0, n}]; (* Michael Somos, Sep 07 2015 *)
  • PARI
    {a(n) = if( n<0, 0, polcoeff( sum(k=0, (sqrtint(4*n+1)-1)\2, x^(k^2+k)) / eta(x + x * O(x^n)), n))};
    
  • PARI
    {a(n) = my(A); if( n<0, 0, A = x * O(x^n); polcoeff( eta(x^4 + A)^2 / (eta(x + A) * eta(x^2 + A)), n))};
    
  • PARI
    {a(n) = if( n<0,0, polcoeff( sum(k=0, 2*n+1, prod(i=1, k, (1 - x^(2*n+2 - i)) / (1 - x^i))) / 2, n^2))};

Formula

Expansion of chi(x) / chi(-x^2)^3 = 1 / (chi(-x)* chi(-x^2)^2) = 1 / (chi(x)^2 * chi(-x)^3) in powers of x where chi() is a Ramanujan theta function. - Michael Somos, Sep 07 2015
Expansion of q^(-5/24) * eta(q^4)^2 / (eta(q) * eta(q^2)) in powers of q.
Euler transform of period 4 sequence [1, 2, 1, 0, ...].
G.f. A(x) is the limit of x^(n^2+n) * P_{2*n+1}(1/x)/2 where P_n(q) = Sum_{k=0..n} C(n, k; q) and C(n, k; q) is the q-binomial coefficients. See A083906 for P_n(q).
G.f.: (Sum_{k>0} x^(k^2-k)) / (Product_{k>0} (1 - x^k)).
a(n) ~ exp(Pi*sqrt(2*n/3)) / (2^(11/4) * 3^(1/4) * n^(3/4)). - Vaclav Kotesovec, Sep 07 2015
G.f. is a period 1 Fourier series which satisfies f(-1 / (576 t)) = 8^(-1/2) g(t) where q = exp(2 Pi i t) and g() is the g.f. for A143161. - Michael Somos, Sep 07 2015
G.f.: Product_{k>=1} (1 + x^(2*k))^2 / (1 - x^(2*k-1)). - Michael Somos, Dec 01 2019

A049597 Triangular array T(n,k) in which k-th column gives coefficients of sum of Gaussian polynomials [k,m] for m=0..k.

Original entry on oeis.org

1, 0, 2, 0, 0, 3, 0, 0, 1, 4, 0, 0, 0, 2, 5, 0, 0, 0, 2, 3, 6, 0, 0, 0, 0, 4, 4, 7, 0, 0, 0, 0, 3, 6, 5, 8, 0, 0, 0, 0, 1, 6, 8, 6, 9, 0, 0, 0, 0, 0, 6, 9, 10, 7, 10, 0, 0, 0, 0, 0, 2, 11, 12, 12, 8, 11, 0, 0, 0, 0, 0, 2, 9, 16, 15, 14, 9, 12, 0, 0, 0, 0, 0, 0, 7, 16, 21, 18, 16, 10, 13, 0, 0, 0, 0, 0, 0
Offset: 0

Views

Author

Keywords

Comments

It appears that T(n-1,k-1) is the number of partitions of n with k objects in the first hook; i.e., with (largest part size) + (number of parts) - 1 = k. If this is correct, we have T(n-1,k-1) = sum_{j<=min(k,n-k-2)} (k-j) * T(k-1,j-1) with T(n-1,n-1) = n. Equivalently, T(n-1,k-1) = T(n-2,k-2) + sum(j<=min(k,n-k-2)} T(k-1,j-1) and thus T(n-1,k-1) = 2*T(n-2,k-2) - T(n-3,k-3) + T(k-1,n-k-3). - Franklin T. Adams-Watters, May 27 2008

Examples

			Table begins:
1
0 2
0 0 3
0 0 1 4
0 0 0 2 5
0 0 0 2 3 6
0 0 0 0 4 4 7
0 0 0 0 3 6 5 8
For k=4 the 5 polynomials have coefficients 1; 1 1 1 1; 1 1 2 1 1; 1 1 1 1; 1; which sum to 5 3 4 3 1, giving column 4.
		

References

  • G. E. Andrews, Theory of Partitions, 1976, pages 240-243

Crossrefs

The nonzero entries of the columns are the rows of A083906.

Programs

  • Maple
    a := n->sort(simplify(sum(product((1-q^i),i=n-r+1..n)/product((1-q^j),j=1..r), r=0..n))):T := proc(n,k) if k=n then n+1 elif k>n then 0 else coeff(a(k),q^(n-k)) fi end:seq(seq(T(n,k),k=0..n),n=0..21);
  • Mathematica
    a [n_] := Sum[Product[1-q^i, {i, n-r+1, n}]/Product[1-q^j, {j, 1, r}], {r, 0, n}] // Simplify; T [n_, k_] := Which[k == n, n+1, k>n, 0, True, Coefficient[a[k], q^(n - k)]]; Table[Table[T[n, k], {k, 0, n}], {n, 0, 21}] // Flatten (* Jean-François Alcover, Feb 19 2015, after Maple *)

Formula

The g.f. for the n-th row as polynomial in q, sum(k=0..n, T(n,k)*q^k) is sum(k>=0, x^(k*(k+1))*q^(2*k)/(1-x^(k+1)*q)/prod(j=1..k, 1-x^j*q)^2). For example, the 5th row is the coefficient of x^6 of the g.f., 2*q^4 + 3*q^5 + 6*q^6. - T. Amdeberhan, Jul 31 2012

Extensions

More terms from Emeric Deutsch, Feb 23 2004

A105552 Irregular triangle T(n,k) read down columns: the number of compositions c of n with largest_part(c)+length(c)=k+1 in row n, column k.

Original entry on oeis.org

1, 2, 4, 1, 7, 5, 2, 11, 14, 12, 5, 1, 16, 30, 39, 32, 18, 7, 2, 22, 55, 95, 113, 101, 71, 41, 18, 6, 1, 29, 91, 195, 299, 357, 350, 292, 207, 126, 64, 27, 9, 2, 37, 140, 357, 664, 978, 1204, 1283, 1198, 992, 731, 482, 284, 148, 66, 25, 7, 1, 46, 204, 602, 1309, 2274, 3329, 4253
Offset: 1

Views

Author

Alford Arnold, May 03 2005

Keywords

Comments

For each of the A000041(n) partitions of n, one can assign a weight to the partition which counts the permutations of that partition, given by the multinomial coefficient derived from the frequency representation of the parts.
An equivalent representation is given by writing down all compositions of n.
The entries count those partitions multiplied by their weights (=compositions) of n where the sum of the largest addend plus number of parts equals k+1. Only nonzero counts are entered into the sequence.
Each entry can also be interpreted as counting a subset of numbers in A055932, because there is a 1-to-1 correspondence between their prime signature and ordered partitions.
Each diagonal of T(n,k) can be decomposed into p(n) sequences. For example,
A086602 = 2 12 39 95 195 ... is the sum of
A000330 = 1 5 14 30 55 ... plus
A001296 = 1 7 25 65 140 ...
The main diagonal and subdiagonals in order of appearance are A000124, A000330, A086602, A089574, A107600, A107601, A109125, ...

Examples

			The row n=7 starts from the partitions (weights in parentheses) 7 (1), 6+1 (2), 5+2 (2), 4+3 (2), 5+1+1 (3), 4+2+1 (6=3!/1!/1!/1!), 3+3+1 (3), 3+2+2 (3), 4+1+1+1 (4=4!/1!/3!), 3+2+1+1 (12 = 4!/1!/1!/2!), 2+2+2+1 (4), 3+1+1+1+1+1 (5), 2+2+1+1+1 (10=5!/2!/3!), 2+1+1+1+1 (6), 1+1+1+1+1+1 (1).
Then T(7,7) = 1+2+3+4+5+6+1 = 22 is the sum of the weights of partitions with largest part 7 and length 1, largest part 6 and length 2,... largest part 1 and length 7.
T(7,6) = 2+6+12+10 = 30 is the sum of the weights of the partitions with largest part 6 and length 1, largest part 5 and length 2, ..., largest part 1 and length 6.
T(7,5) = 2+3+3+4 = 12 collects all the partitions with largest part 5 and length 1 down to largest part 1 and length 5.
The array has A033638(k) nonzero entries per column, starting at n=1 as :
1
..2
....4
....1..7
.......5..11
.......2..14..16
..........12..30..22
...........5..39..55..29
...........1..32..95..91..37
..............18.113.195.140
...............7.101.299.357
...............2
		

Crossrefs

Cf. A047969, A047970, A055932, A057335, A083480, A083906, A089349, A033638, A086602 (subdiagonal), A089574 (subdiagonal).

Programs

  • Maple
    A033638 := proc(n) ( (7+(-1)^n)/2 + n^2 )/4 ; end proc:
    freq := proc(L,n) local a,p; a := 0 ; for p in L do if p = n then a := a+1 ; end if; end do: a ; end proc:
    M3 := proc(L) local a,i; a := factorial(nops(L)) ; for i in convert(L,set) do a := a/factorial(freq(L,i)) ; end do: a ; end proc:
    A105552 := proc(n,k) local p,a,l ; a := 0 ; for p in combinat[partition](n) do if max(op(p)) + nops(p) = k+1 then a := a+ M3(p); end if; end do ; a ; end proc:
    for k from 1 to 15 do for n from k to k+A033638(k)+1 do T := A105552(n,k) ; if T >0 then printf("%d,", A105552(n,k)) ; end if; end do: printf("\n") ; end do: # R. J. Mathar, Jun 26 2010
    # second Maple program:
    b:= proc(n, k, p) option remember; `if`(n=0 and k=0, 1,
         `if`(k<1, 0, add(b(n-j, k-1-max(p, j)+p, max(p, j)), j=1..n)))
        end:
    T:= k-> seq(b(n, k+1, 0), n=k..k+floor((k-1)^2/4)):
    seq(T(k), k=1..10);  # Alois P. Heinz, Jul 24 2013
  • Mathematica
    b[n_, k_, p_] := b[n, k, p] = If[n == 0 && k == 0, 1, If[k < 1, 0, Sum[b[n - j, k - 1 - Max[p, j] + p, Max[p, j]], {j, 1, n}]]]; T[k_] := Table[b[n, k + 1, 0], {n, k, k + Floor[(k - 1)^2/4]}]; Table[T[k], {k, 1, 10}] // Flatten (* Jean-François Alcover, Jan 08 2016, after Alois P. Heinz *)

Formula

Row sums: Sum_{k=0..n} T(n,k) = 2^(n-1).
Column sums: Sum_{n>=k} T(n,k) = A047970(n).

Extensions

Definition clarified by R. J. Mathar, Jun 26 2010

A330369 Triangle read by rows: T(n,k) (1 <= k <= n) is the total number of right angles of size k in all partitions of n.

Original entry on oeis.org

1, 0, 2, 0, 0, 3, 1, 0, 1, 4, 2, 0, 0, 2, 5, 3, 2, 0, 2, 3, 6, 4, 4, 0, 0, 4, 4, 7, 5, 6, 3, 0, 3, 6, 5, 8, 7, 8, 7, 0, 1, 6, 8, 6, 9, 9, 10, 11, 4, 0, 6, 9, 10, 7, 10, 13, 12, 15, 10, 0, 2, 11, 12, 12, 8, 11
Offset: 1

Views

Author

Omar E. Pol, Dec 12 2019

Keywords

Comments

This triangle has the property that it contains the triangle A049597, since if we replace with zeros the positive terms before the first zero in the row n of this triangle, we get the triangle A049597.
Hence the sum of the terms after the last zero in row n equals A000041(n), the number of partitions of n (see the Example section).
Observation: at least the first 11 terms of column 1 coincide with A188674 (using the same indices).

Examples

			Triangle begins:
   1;
   0,  2;
   0,  0,  3;
   1,  0,  1,  4;
   2,  0,  0,  2,  5;
   3,  2,  0,  2,  3,  6;
   4,  4,  0,  0,  4,  4,  7;
   5,  6,  3,  0,  3,  6,  5,  8;
   7,  8,  7,  0,  1,  6,  8,  6,  9;
   9, 10, 11,  4,  0,  6,  9, 10,  7, 10;
  13, 12, 15, 10,  0,  2, 11, 12, 12,  8, 11;
Figure 1 below shows the Ferrers diagram of the partition of 24: [7, 6, 3, 3, 2, 1, 1, 1]. Figure 2 shows the right-angles diagram of the same partition. Note that in this last diagram we can see the size of the three right angles as follows: the first right angle has size 14 because it contains 14 square cells, the second right angle has size 8 and the third right angle has size 2.
.
.                                     Right-angles   Right
Part   Ferrers diagram         Part   diagram        angle
                                      _ _ _ _ _ _ _
  7    * * * * * * *             7   |  _ _ _ _ _ _|  14
  6    * * * * * *               6   | |  _ _ _ _|     8
  3    * * *                     3   | | | |           2
  3    * * *                     3   | | |_|
  2    * *                       2   | |_|
  1    *                         1   | |
  1    *                         1   | |
  1    *                         1   |_|
.
       Figure 1.                      Figure 2.
.
For n = 8 the partitions of 8 and their respective right-angles diagrams are as follows:
.
    _       _ _       _ _ _       _ _ _ _       _ _ _ _ _
  1| |8   2|  _|8   3|  _ _|8   4|  _ _ _|8   5|  _ _ _ _|8
  1| |    1| |      1| |        1| |          1| |
  1| |    1| |      1| |        1| |          1| |
  1| |    1| |      1| |        1| |          1|_|
  1| |    1| |      1| |        1|_|
  1| |    1| |      1|_|
  1| |    1|_|
  1|_|
    _ _ _ _ _ _       _ _ _ _ _ _ _       _ _ _ _ _ _ _ _
  6|  _ _ _ _ _|8   7|  _ _ _ _ _ _|8   8|_ _ _ _ _ _ _ _|8
  1| |              1|_|
  1|_|
.
    _ _       _ _ _       _ _ _ _       _ _ _ _ _       _ _ _ _ _ _
  2|  _|7   3|  _ _|7   4|  _ _ _|7   5|  _ _ _ _|7   6|  _ _ _ _ _|7
  2| |_|1   2| |_|  1   2| |_|    1   2| |_|      1   2|_|_|        1
  1| |      1| |        1| |          1|_|
  1| |      1| |        1|_|
  1| |      1|_|
  1|_|
.
    _ _       _ _ _       _ _ _       _ _ _ _       _ _ _ _       _ _ _ _ _
  2|  _|6   3|  _ _|6   3|  _ _|6   4|  _ _ _|6   4|  _ _ _|6   5|  _ _ _ _|6
  2| | |2   2| | |  2   3| |_ _|2   2| | |    2   3| |_ _|  2   3|_|_ _|    2
  2| |_|    2| |_|      1| |        2|_|_|        1|_|
  1| |      1|_|        1|_|
  1|_|
.
    _ _       _ _ _        _ _ _ _
  2|  _|5   3|  _ _|5    4|  _ _ _|5
  2| | |3   3| |  _|3    4|_|_ _ _|3
  2| | |    2|_|_|
  2|_|_|
.
There are  5 right angles of size 1, so T(8,1) = 5.
There are  6 right angles of size 2, so T(8,2) = 6.
There are  3 right angles of size 3, so T(8,3) = 3.
There are no right angle  of size 4, so T(8,4) = 0.
There are  3 right angles of size 5, so T(8,5) = 3.
There are  6 right angles of size 6, so T(8,6) = 6.
There are  5 right angles of size 7, so T(8,7) = 5.
There are  8 right angles of size 8, so T(8,8) = 8.
Hence the 8th row of triangle is [5, 6, 3, 0, 3, 6, 5, 8].
Note that the sum of the terms after the last zero is 3 + 6 + 5 + 8 = 22, equaling A000041(8) = 22, the number of partitions of 8.
		

References

  • G. E. Andrews, Theory of Partitions, Cambridge University Press, 1984, page 143 [Defines the right angles in the Ferrers graph of a partition. - N. J. A. Sloane, Nov 20 2020]

Crossrefs

Row sums give A115995.
Right border gives A000027.

A129529 Triangle read by rows: T(n,k) is the number of ternary words of length n on {0,1,2} that have k inversions (n >= 0, k >= 0).

Original entry on oeis.org

1, 3, 6, 3, 10, 8, 8, 1, 15, 15, 21, 18, 9, 3, 21, 24, 39, 45, 48, 30, 24, 9, 3, 28, 35, 62, 82, 107, 108, 101, 81, 62, 37, 17, 8, 1, 36, 48, 90, 129, 186, 222, 264, 252, 255, 219, 183, 126, 90, 48, 27, 9, 3, 45, 63, 123, 186, 285, 372, 492, 561, 624, 648, 651, 597, 537, 435, 336, 249, 165, 99, 54, 27, 9, 3
Offset: 0

Views

Author

Emeric Deutsch, Apr 22 2007

Keywords

Comments

Row n has 1 + floor(n^2/3) terms.
Row sums are equal to 3^n = A000244(n).
Alternating row sums are 3^(ceiling(n/2)) = A108411(n+1).
This sequence is mentioned in the Andrews-Savage-Wilf paper. - Omar E. Pol, Jan 30 2012

Examples

			T(3,2) = 8 because we have 100, 110, 120, 200, 201, 211, 220 and 221.
Triangle starts:
   1;
   3;
   6,  3;
  10,  8,  8,  1;
  15, 15, 21, 18,  9,  3;
  21, 24, 39, 45, 48, 30, 24,  9,  3;
  ...
		

References

  • M. Bona, Combinatorics of Permutations, Chapman & Hall/CRC, Boca Raton, FL, 2004, pp. 57-61.
  • G. E. Andrews, The Theory of Partitions, Addison-Wesley, 1976.

Crossrefs

Programs

  • Maple
    for n from 0 to 40 do br[n]:=sum(q^i,i=0..n-1) od: for n from 0 to 40 do f[n]:=simplify(product(br[j],j=1..n)) od: mbr:=(n,a,b,c)->simplify(f[n]/f[a]/f[b]/f[c]): for n from 0 to 9 do G[n]:=sort(simplify(sum(sum(mbr(n,a,b,n-a-b),b=0..n-a),a=0..n))) od: for n from 0 to 9 do seq(coeff(G[n],q,j),j=0..floor(n^2/3)) od; # yields sequence in triangular form
    # second Maple program:
    b:= proc(n, l) option remember; `if`(n=0, 1, add(expand(b(n-1, `if`(j<3,
          subsop(j=l[j]+1, l), l)))*x^([0, l[1], l[1]+l[2]][j]), j=1..3))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n, [0$2])):
    seq(T(n), n=0..10);  # Alois P. Heinz, Feb 12 2025
  • Mathematica
    b[n_, l_] := b[n, l] =
       If[n == 0, 1, Sum[Expand[b[n-1, If[j < 3, ReplacePart[l, j -> l[[j]]+1], l]]]*x^({0, l[[1]], l[[1]]+l[[2]]}[[j]]), {j, 1, 3}]];
    T[n_] := With[{p = b[n, {0, 0}]}, Table[Coefficient[p, x, i], {i, 0, Exponent[p, x]}]];
    Table[T[n], {n, 0, 10}] // Flatten (* Jean-François Alcover, Apr 13 2025, after Alois P. Heinz *)

Formula

T(n,0) = (n+1)*(n+2)/2 = A000217(n+1).
Sum_{k>=0} k*T(n,k) = 3^(n-1)*n*(n-1)/2 = A129530(n).
Generating polynomial of row n is Sum_{i=0..n} Sum_{j=0..n-i} binomial[n; i,j,n-i-j], where binomial[n;a,b,c] (a+b+c=n) is a q-multinomial coefficient.
Sum_{k=0..floor(n^2/3)} (-1)^k * T(n,k) = A056449(n). - Alois P. Heinz, Feb 12 2025

A129531 Triangle read by rows: T(n,k) is the number of 4-ary words of length n on {0,1,2,3} having k inversions (n >= 0, k >= 0).

Original entry on oeis.org

1, 4, 10, 6, 20, 20, 20, 4, 35, 45, 65, 60, 35, 15, 1, 56, 84, 144, 180, 200, 152, 120, 60, 24, 4, 84, 140, 266, 386, 526, 584, 590, 524, 424, 290, 164, 86, 26, 6, 120, 216, 440, 700, 1064, 1384, 1720, 1844, 1940, 1820, 1616, 1272, 956, 620, 380, 184, 80, 24, 4
Offset: 0

Views

Author

Emeric Deutsch, Apr 22 2007

Keywords

Comments

Row n has (apparently) ceiling((3n^2+4)/8) terms.
Row sums are equal to 4^n = A000302(n).
Alternating row sums are 4^(ceiling(n/2)).
T(n,0) = (n+1)*(n+2)(n+3)/6 = A000292(n+1).
Sum_{k>=0} k*T(n,k) = 3*n*(n-1)*4^(n-2) = A129532(n).
This sequence is mentioned in the Andrews-Savage-Wilf paper. - Omar E. Pol, Jan 30 2012

Examples

			T(2,1)=6 because we have 10, 20, 30, 21, 31 and 32.
Triangle starts:
   1;
   4;
  10,   6;
  20,  20,  20,   4;
  35,  45,  65,  60,  35,  15,   1;
  56,  84, 144, 180, 200, 152, 120,  60,  24,   4;
		

References

  • G. E. Andrews, The Theory of Partitions, Addison-Wesley, 1976.
  • M. Bona, Combinatorics of Permutations, Chapman & Hall/CRC, Boca Raton, FL, 2004, pp. 57-61.

Crossrefs

Programs

  • Maple
    for n from 0 to 12 do br[n]:=sum(q^i,i=0..n-1) od: for n from 0 to 12 do f[n]:=simplify(product(br[j],j=1..n)) od: mbr:=(n,a,b,c,d)->simplify(f[n]/f[a]/f[b]/f[c]/f[d]): for n from 0 to 8 do G[n]:=sort(simplify(sum(sum(sum(mbr(n,a,b,c,n-a-b-c),c=0..n-a-b),b=0..n-a),a=0..n))) od: for n from 0 to 8 do seq(coeff(G[n],q,j),j=0..ceil((3*n^2-4)/8)) od; # yields sequence in triangular form

Formula

Generating polynomial of row n is Sum_{a=0..n} Sum_{b=0..n-a} Sum_{c=0..n-a-b} binomial[n; a,b,c,n-a-b-c], where binomial[n;a,b,c,d] (a+b+c+d=n) is a q-multinomial coefficient.
Showing 1-10 of 12 results. Next