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.

Previous Showing 51-60 of 109 results. Next

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

Original entry on oeis.org

1, 3, 9, 26, 72, 192, 496, 1248, 3072, 7424, 17664, 41472, 96256, 221184, 503808, 1138688, 2555904, 5701632, 12648448, 27918336, 61341696, 134217728, 292552704, 635437056, 1375731712, 2969567232, 6392119296, 13723762688
Offset: 0

Views

Author

Michael A. Childers (childers_moof(AT)yahoo.com), Jul 27 2002

Keywords

Comments

Binomial transform of 1+n*(n+1)/2, A000124.
Number of 123-avoiding ternary words of length n-1.
Row sums of triangle A134247. Also double binomial transform of (1, 1, 1, 0, 0, 0, ...). - Gary W. Adamson, Oct 15 2007
Equals row sums of triangle A144333. - Gary W. Adamson, Sep 18 2008

Crossrefs

Programs

  • Maple
    A072863 := proc(n)
        2^(n-3)*(n^2+3*n+8) ;
    end proc: # R. J. Mathar, May 21 2018
  • Mathematica
    Table[Sum[Binomial[m-1, k](#^2/2 -#/2 +1 &)[k+1], {k, 0, m}], {m, 36}]
    LinearRecurrence[{6,-12,8},{1,3,9},30] (* Harvey P. Dale, May 15 2019 *)
  • PARI
    a(n)=2^(n-3)*(n^2+3*n+8); \\ Charles R Greathouse IV, Oct 07 2015

Formula

From Paul Barry, Jul 22 2004: (Start)
G.f.: (1-3x+3x^2)/(1-2x)^3;
a(n) = 2^(n-3)*(n^2+3n+8). (End)
From Paul Barry, Mar 27 2007: (Start)
E.g.f.: e^(2*x)*(1+x+x^2/2);
a(n) = Sum_{k=0..2} binomial(n,k)*2^(n-k). (End)
a(n-1) + A001788(n-2) = A104270(n). - R. J. Mathar, May 21 2018

Extensions

Corrected and extended by Wouter Meeussen, Jul 30 2002
Title and offset corrected. - R. J. Mathar, May 21 2018
New name using explicit formula. - Joerg Arndt, May 21 2018

A081130 Square array of binomial transforms of (0,0,1,0,0,0,...), read by antidiagonals.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 3, 0, 0, 0, 1, 6, 6, 0, 0, 0, 1, 9, 24, 10, 0, 0, 0, 1, 12, 54, 80, 15, 0, 0, 0, 1, 15, 96, 270, 240, 21, 0, 0, 0, 1, 18, 150, 640, 1215, 672, 28, 0, 0, 0, 1, 21, 216, 1250, 3840, 5103, 1792, 36, 0, 0, 0, 1, 24, 294, 2160, 9375, 21504, 20412, 4608, 45, 0
Offset: 0

Views

Author

Paul Barry, Mar 08 2003

Keywords

Comments

Rows, of the square array, are three-fold convolutions of sequences of powers.

Examples

			The array begins as:
  0,  0,  0,   0,   0,    0, ...
  0,  0,  0,   0,   0,    0, ...
  0,  1,  1,   1,   1,    1, ... A000012
  0,  3,  6,   9,  12,   15, ... A008585
  0,  6, 24,  54,  96,  150, ... A033581
  0, 10, 80, 270, 640, 1250, ... A244729
The antidiagonal triangle begins as:
  0;
  0, 0;
  0, 0, 0;
  0, 0, 1, 0;
  0, 0, 1, 3,  0;
  0, 0, 1, 6,  6,  0;
  0, 0, 1, 9, 24, 10, 0;
		

Crossrefs

Main diagonal: A081131.
Rows: A000012 (n=2), A008585 (n=3), A033581 (n=4), A244729 (n=5).
Columns: A000217 (k=1), A001788 (k=2), A027472 (k=3), A038845 (k=4), A081135 (k=5), A081136 (k=6), A027474 (k=7), A081138 (k=8), A081139 (k=9), A081140 (k=10), A081141 (k=11), A081142 (k=12), A027476 (k=15).

Programs

  • Magma
    [k eq n select 0 else (n-k)^(k-2)*Binomial(k,2): k in [0..n], n in [0..12]]; // G. C. Greubel, May 14 2021
    
  • Mathematica
    Table[If[k==n, 0, (n-k)^(k-2)*Binomial[k, 2]], {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, May 14 2021 *)
  • PARI
    T(n, k)=if (k==0, 0, k^(n-2)*binomial(n, 2));
    seq(nn) = for (n=0, nn, for (k=0, n, print1(T(k, n-k), ", ")); );
    seq(12) \\ Michel Marcus, May 14 2021
  • Sage
    flatten([[0 if (k==n) else (n-k)^(k-2)*binomial(k,2) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, May 14 2021
    

Formula

T(n, k) = k^(n-2)*binomial(n, 2), with T(n, 0) = 0 (square array).
T(n, n) = A081131(n).
Rows have g.f. x^3/(1-k*x)^n.
From G. C. Greubel, May 14 2021: (Start)
T(k, n-k) = (n-k)^(k-2)*binomial(k,2) with T(n, n) = 0 (antidiagonal triangle).
Sum_{k=0..n} T(n, n-k) = A081197(n). (End)

Extensions

Term a(5) corrected by G. C. Greubel, May 14 2021

A081908 a(n) = 2^n*(n^2 - n + 8)/8.

Original entry on oeis.org

1, 2, 5, 14, 40, 112, 304, 800, 2048, 5120, 12544, 30208, 71680, 167936, 389120, 892928, 2031616, 4587520, 10289152, 22937600, 50855936, 112197632, 246415360, 538968064, 1174405120, 2550136832, 5519704064, 11911823360, 25635586048
Offset: 0

Views

Author

Paul Barry, Mar 31 2003

Keywords

Comments

Binomial transform of A000124 (when this begins 1,1,2,4,7,...).
2nd binomial transform of (1,0,1,0,0,0,...).
Case k=2 where a(n,k) = k^n(n^2 - n + 2k^2)/(2k^2) with g.f. (1 - 2kx + (k^2+1)x^2)/(1-kx)^3.

Crossrefs

Programs

  • Magma
    [2^n*(n^2-n+8)/8: n in [0..40]]; // Vincenzo Librandi, Apr 27 2011
    
  • Mathematica
    Table[2^n*(n^2-n+8)/8, {n,0,50}] (* or *) LinearRecurrence[{6,-12,8}, {1, 2,5}, 50] (* G. C. Greubel, Oct 17 2018 *)
  • PARI
    a(n)=2^n*(n^2-n+8)/8 \\ Charles R Greathouse IV, Oct 07 2015

Formula

G.f.: (1 - 4*x + 5*x^2)/(1-2*x)^3.
a(n) = A000079(n) + (A001788(n) - A001787(n))/2. - Paul Barry, May 27 2003
a(n) = Sum_{k=0..n} C(n, k)*(1 + C(k, 2)). - Paul Barry, May 27 2003
E.g.f.: (2 + x^2)*exp(2*x)/2. - G. C. Greubel, Oct 17 2018

A129533 Array read by antidiagonals: T(n,k) = binomial(n+1,2)*binomial(n+k,n+1) for 0 <= k <= n.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 0, 3, 3, 0, 0, 6, 12, 6, 0, 0, 10, 30, 30, 10, 0, 0, 15, 60, 90, 60, 15, 0, 0, 21, 105, 210, 210, 105, 21, 0, 0, 28, 168, 420, 560, 420, 168, 28, 0, 0, 36, 252, 756, 1260, 1260, 756, 252, 36, 0, 0, 45, 360, 1260, 2520, 3150, 2520, 1260, 360, 45, 0, 0, 55, 495
Offset: 0

Views

Author

Emeric Deutsch, Apr 22 2007

Keywords

Comments

Previous name was: Triangle read by rows: T(n,k)=derivative of the q-binomial coefficient [n,k] evaluated at q=1 (0<=k<=n). - N. J. A. Sloane, Jan 06 2016
For example, T(5,2)=30 because [5,2] = q^6 + q^5 + 2*q^4 + 2*q^3 + 2*q^2 + q + 1 with derivative 6q^5 + 5q^4 + 8q^3 + 6q^2 + 4q + 1, having value 30 at q=1. - Emeric Deutsch, Apr 22 2007
Sum of entries in n-th antidiagonal = n(n-1)2^(n-3) = A001788(n-1).
T(n,k) = A094305(n-2, k-1) for n >= 2, k >= 1.
T(n,k) is total number of pips on a set of generalized linear dominoes with n cells (rather than two) and with the number of pips in each cell running from 0 to k (rather than 6). T(2,6) = 168 gives the total number of pips on a standard set of dominoes. We regard a generalized linear domino with n cells and up to k pips per cell as an ordered n-tuple [i_1, i_2, ..., i_n] with 0 <= i_1 <= i_2 <= ... <= i_n <= k. - Alan Shore and N. J. A. Sloane, Jan 06 2016
T(n,k) can also be written more symmetrically as the trinomial coefficient (n+k; n-1, k-1, 2). - N. J. A. Sloane, Jan 06 2016
As a triangle read by rows, T(n,k) is the total number of inversions over all length n binary words having exactly k 1's. T(n,k) is also the total area above all North East lattice paths from the origin to the point (k,n-k). - Geoffrey Critzer, Mar 22 2018

Examples

			Array begins:
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... (A000004)
0, 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 78, 91, ... (A000217)
0, 3, 12, 30, 60, 105, 168, 252, 360, 495, 660, 858, ... (A027480)
0, 6, 30, 90, 210, 420, 756, 1260, 1980, 2970, 4290, ... (A033487)
0, 10, 60, 210, 560, 1260, 2520, 4620, 7920, 12870, ... (A266732)
0, 15, 105, 420, 1260, 3150, 6930, 13860, 25740, ... (A240440)
0, 21, 168, 756, 2520, 6930, 16632, 36036, ... (A266733)
...
If regarded as a triangle, this begins:
  0;
  0,  0;
  0,  1,  0;
  0,  3,  3,  0;
  0,  6, 12,  6,  0;
  0, 10, 30, 30, 10,  0;
  0, 15, 60, 90, 60, 15, 0;
  ...
		

References

  • G. E. Andrews, The Theory of Partitions, Addison-Wesley, 1976.

Crossrefs

Cf. A001788.
A128503 and A094305 are very similar sequences.

Programs

  • Maple
    dd:=proc(n,m) if m=0 or n=0 then 0 else (m+n)!/(2*(m-1)!*(n-1)!); fi; end;
    f:=n->[seq(dd(n,m),m=0..30)];
    for n from 0 to 10 do lprint(f(n)); od: # produces sequence as square array
    T:=(n,k)->k*(k+1)*binomial(n,k+1)/2: for n from 0 to 12 do seq(T(n,k),k=0..n) od; # yields sequence in triangular form
  • Mathematica
    Table[Table[D[Expand[FunctionExpand[QBinomial[n, k, q]]], q] /. q -> 1, {k, 0, n}], {n, 0, 15}] // Grid (* Geoffrey Critzer, Mar 22 2018 *)

Formula

T(n,k) = (1/2)*k*(k+1)*binomial(n,k+1).
G.f.: G(q,z) = qz^2/(1-z-qz)^3.

Extensions

Entry revised by N. J. A. Sloane, Jan 06 2016

A141054 8-idempotent numbers: a(n) = binomial(n+8,8)*8^n.

Original entry on oeis.org

1, 72, 2880, 84480, 2027520, 42172416, 787218432, 13495173120, 215922769920, 3262832967680, 46984794734592, 649244436332544, 8656592484433920, 111869810568069120, 1406363332855726080, 17251390216363573248, 207016682596362878976, 2435490383486622105600
Offset: 0

Views

Author

Zerinvary Lajos, Aug 01 2008

Keywords

Comments

With a different offset, number of n-permutations of 9 objects:
p, r, s, t, u, v, z, x, y with repetition allowed, containing exactly eight (8) u's. Example: a(1)=72 because we have
uuuuuuuup, uuuuuuupu, uuuuuupuu, uuuuupuuu, uuuupuuuu, uuupuuuuu, uupuuuuuu, upuuuuuuu, puuuuuuuu,
uuuuuuuur, uuuuuuuru, uuuuuuruu, uuuuuruuu, uuuuruuuu, uuuruuuuu, uuruuuuuu, uruuuuuuu, ruuuuuuuu,
uuuuuuuus, uuuuuuusu, uuuuuusuu, uuuuusuuu, uuuusuuuu, uuusuuuuu, uusuuuuuu, usuuuuuuu, suuuuuuuu,
uuuuuuuut, uuuuuuutu, uuuuuutuu, uuuuutuuu, uuuutuuuu, uuutuuuuu, uutuuuuuu, utuuuuuuu, tuuuuuuuu,
uuuuuuuuv, uuuuuuuvu, uuuuuuvuu, uuuuuvuuu, uuuuvuuuu, uuuvuuuuu, uuvuuuuuu, uvuuuuuuu, vuuuuuuuu,
uuuuuuuuz, uuuuuuuzu, uuuuuuzuu, uuuuuzuuu, uuuuzuuuu, uuuzuuuuu, uuzuuuuuu, uzuuuuuuu, zuuuuuuuu,
uuuuuuuux, uuuuuuuxu, uuuuuuxuu, uuuuuxuuu, uuuuxuuuu, uuuxuuuuu, uuxuuuuuu, uxuuuuuuu, xuuuuuuuu,
uuuuuuuuy, uuuuuuuyu, uuuuuuyuu, uuuuuyuuu, uuuuyuuuu, uuuyuuuuu, uuyuuuuuu, uyuuuuuuu, yuuuuuuuu.

Crossrefs

Programs

  • Magma
    [8^n* Binomial(n+8, 8): n in [0..20]]; // Vincenzo Librandi, Oct 16 2011
    
  • Maple
    seq(binomial(n+8,8)*8^n, n=0..17);
  • Mathematica
    Table[Binomial[n + 8, 8] 8^n, {n, 0, 15}] (* Michael De Vlieger, Jul 24 2017 *)
  • PARI
    vector(15,n,binomial(n+7,8)*8^(n-1)) \\ Derek Orr, Jul 24 2017

Formula

a(n) = binomial(n+8,8)*8^n.
G.f.: 1/(1-8*x)^9. - Vincenzo Librandi, Oct 16 2011
From Amiram Eldar, Apr 17 2022: (Start)
Sum_{n>=0} 1/a(n) = 738990736/105 - 52706752*log(8/7).
Sum_{n>=0} (-1)^n/a(n) = 306110016*log(9/8) - 1261909808/35. (End)

A050989 7-idempotent numbers.

Original entry on oeis.org

1, 56, 1764, 41160, 792330, 13311144, 201885684, 2826399576, 37096494435, 461645264080, 5493578642552, 62926446269232, 697434779483988, 7510836086750640, 78863778910881720, 809668130151718992, 8147285559651672357, 80514351413028291528, 782778416515552834300
Offset: 7

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    [7^(n-7)* Binomial(n, 7): n in [7..30]]; // Vincenzo Librandi, Oct 16 2011
  • Maple
    seq(binomial(n, 7)*7^(n-7), n=7..33); # Zerinvary Lajos, Aug 01 2008
  • Mathematica
    LinearRecurrence[{56,-1372,19208,-168070,941192,-3294172,6588344,-5764801}, {1,56,1764,41160,792330,13311144,201885684,2826399576},20] (* Harvey P. Dale, May 31 2014 *)
  • PARI
    a(n)=binomial(n, 7)*7^(n-7) \\ Charles R Greathouse IV, Sep 03 2011
    

Formula

a(n) = C(n, 7)*7^(n-7).
G.f.: x^7/(1-7*x)^8.
From Amiram Eldar, Apr 17 2022: (Start)
Sum_{n>=7} 1/a(n) = 2286144*log(7/6) - 10572289/30.
Sum_{n>=7} (-1)^(n+1)/a(n) = 12845056*log(8/7) - 51456517/30. (End)

A059298 Triangle of idempotent numbers binomial(n,k)*k^(n-k), version 2.

Original entry on oeis.org

1, 2, 1, 3, 6, 1, 4, 24, 12, 1, 5, 80, 90, 20, 1, 6, 240, 540, 240, 30, 1, 7, 672, 2835, 2240, 525, 42, 1, 8, 1792, 13608, 17920, 7000, 1008, 56, 1, 9, 4608, 61236, 129024, 78750, 18144, 1764, 72, 1, 10, 11520, 262440, 860160, 787500, 272160, 41160
Offset: 0

Views

Author

N. J. A. Sloane, Jan 25 2001

Keywords

Comments

The inverse triangle is the signed version 1,-2,1,9,-6,1,.. of triangle A061356. - Peter Luschny, Mar 13 2009
T(n,k) is the sum of the products of the cardinality of the blocks (cells) in the set partitions of {1,2,..,n} into exactly k blocks.
From Peter Bala, Jul 22 2014: (Start)
Exponential Riordan array [(1+x)*exp(x), x*exp(x)].
Let M = A093375, the exponential Riordan array [(1+x)*exp(x), x], and for k = 0,1,2,... define M(k) to be the lower unit triangular block array
/I_k 0\
\ 0 M/
having the k x k identity matrix I_k as the upper left block; in particular, M(0) = M. The present triangle equals the infinite matrix product M(0)*M(1)*M(2)*... - see the Example section. (End)
The Bell transform of n+1. For the definition of the Bell transform see A264428. - Peter Luschny, Jan 18 2016

Examples

			Triangle begins
1;
2, 1;
3, 6, 1;
4, 24, 12, 1; ...
From _Peter Bala_, Jul 22 2014: (Start)
With the arrays M(k) as defined in the Comments section, the infinite product M(0)*M(1)*M(2)*... begins
/1          \/1        \/1        \      /1           \
|2  1       ||0 1      ||0 1      |      |2  1        |
|3  4  1    ||0 2 1    ||0 0 1    |... = |3  6  1     |
|4  9  6 1  ||0 3 4 1  ||0 0 2 1  |      |4 24 12  1  |
|5 16 18 8 1||0 4 9 6 1||0 0 3 4 1|      |5 80 90 20 1|
|...        ||...      ||...      |      |...         | (End)
		

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 91, #43 and p. 135, [3i'].

Crossrefs

There are 4 versions: A059297, A059298, A059299, A059300.
Diagonals give A001788, A036216, A040075, A050982, A002378, 3*A002417, etc.
Row sums are A000248. A093375.

Programs

  • Magma
    /* As triangle */ [[Binomial(n,k)*k^(n-k): k in [1..n]]: n in [1.. 15]]; // Vincenzo Librandi, Aug 22 2015
    
  • Maple
    T:= (n, k)-> binomial(n+1,k+1)*(k+1)^(n-k): seq(seq(T(n, k), k=0..n), n=0..10); # Georg Fischer, Oct 27 2021
  • Mathematica
    t = Transpose[ Table[ Range[0, 11]! CoefficientList[ Series[(x Exp[x])^n/n!, {x, 0, 11}], x], {n, 11}]]; Table[ t[[n, k]], {n, 2, 11}, {k, n - 1}] // Flatten (* or simply *)
    t[n_, k_] := Binomial[n, k]*k^(n - k); Table[t[n, k], {n, 10}, {k, n}] // Flatten
  • PARI
    for(n=1, 25, for(k=1, n, print1(binomial(n,k)*k^(n-k), ", "))) \\ G. C. Greubel, Jan 05 2017
  • Sage
    # uses[bell_matrix from A264428]
    # Adds a column 1,0,0,0, ... at the left side of the triangle.
    bell_matrix(lambda n: n+1, 10) # Peter Luschny, Jan 18 2016
    

A066185 Sum of the first moments of all partitions of n with weights starting at 0.

Original entry on oeis.org

0, 0, 1, 4, 12, 26, 57, 103, 191, 320, 537, 843, 1342, 2015, 3048, 4457, 6509, 9250, 13170, 18316, 25483, 34853, 47556, 64017, 86063, 114285, 151462, 198871, 260426, 338275, 438437, 564131, 724202, 924108, 1176201, 1489237, 1881273, 2365079, 2966620, 3705799
Offset: 0

Views

Author

Wouter Meeussen, Dec 15 2001

Keywords

Comments

The first element of each partition is given weight 0.
Consider the partitions of n, e.g., n=5. For each partition sum T(e-1) and sum all these. E.g., 5 -> T(4)=10, 41 -> T(3)+T(0)=6, 32 -> T(2)+T(1)=4, 311 -> T(2)+T(0)+T(0)=3, 221 -> T(1)+T(1)+T(0)=2, 21111 ->1 and 11111 ->0. Summing, 10+6+4+3+2+1+0 = 26 as desired. - Jon Perry, Dec 12 2003
Also equals the sum of f(p) over the partitions p of n, where f(p) is obtained by replacing each part p_i of partition p by p_i*(p_i-1)/2. See I. G. Macdonald: Symmetric functions and Hall polynomials 2nd edition, p. 3, eqn (1.5) and (1.6). - Wouter Meeussen, Sep 25 2014

Examples

			a(3)=4 because the first moments of all partitions of 3 are {3}.{0},{2,1}.{0,1} and {1,1,1}.{0,1,2}, resulting in 0,1,3; summing to 4.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0 or i=1, [1, 0],
          b(n, i-1)+(h-> h+[0, h[1]*i*(i-1)/2])(b(n-i, min(n-i, i))))
        end:
    a:= n-> b(n$2)[2]:
    seq(a(n), n=0..50);  # Alois P. Heinz, Jan 29 2014
  • Mathematica
    Table[ Plus@@ Map[ #.Range[ 0, -1+Length[ # ] ]&, IntegerPartitions[ n ] ], {n, 40} ]
    b[n_, i_] := b[n, i] = If[n==0, {1, 0}, If[i<1, {0, 0}, If[i>n, b[n, i-1], b[n, i-1] + Function[h, h+{0, h[[1]]*i*(i-1)/2}][b[n-i, i]]]]]; a[n_] := b[n, n][[2]]; Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Oct 26 2015, after Alois P. Heinz *)

Formula

a(n) = 1/2*(A066183(n) - A066186(n)). - Vladeta Jovovic, Mar 23 2003
G.f.: Sum_{k>=1} x^(2*k)/(1 - x^k)^3 / Product_{j>=1} (1 - x^j). - Ilya Gutkovskiy, Mar 05 2021
a(n) = Sum_{k=0..A161680(n)} k * A264034(n,k). - Alois P. Heinz, Jan 20 2023
a(n) ~ 3 * zeta(3) * sqrt(n) * exp(Pi*sqrt(2*n/3)) / (sqrt(2) * Pi^3). - Vaclav Kotesovec, Jul 06 2025

A100381 a(n) = 2^n*binomial(n,2).

Original entry on oeis.org

0, 0, 4, 24, 96, 320, 960, 2688, 7168, 18432, 46080, 112640, 270336, 638976, 1490944, 3440640, 7864320, 17825792, 40108032, 89653248, 199229440, 440401920, 968884224, 2122317824, 4630511616, 10066329600, 21810380800, 47110422528
Offset: 0

Views

Author

Jorge Coveiro, Dec 30 2004

Keywords

Comments

From Enrique Navarrete, Jun 13 2023: (Start)
a(n) is the number of ways to partition the set [n]={1,2,...,n} into two sets S,T and select 2 elements in total (from either S or T or both).
Example. For n=4, sample partitions are given (where S(i),T(j) means i elements are selected from S, j elements are selected from T):
S={ }, T={1,2,3,4}: partition [4] in 1 way, S(0),T(2) (6 ways);
S={1}, T={2,3,4}: partition [4] in 4 such ways, S(1),T(1) or S(0),T(2) (24 ways);
S={1,2}, T={3,4}: partition [4], in such 6 ways, S(1),T(1) or S(0),T(2) or S(2),T(0) (36 ways);
S={1,2,3}, T={4}: partition [4] in 4 such ways, S(1),T(1) or S(2),T(0) (24 ways);
S={1,2,3,4}, T={ }: partition [4] in 1 way, S(2),T(0) (6 ways). (End)

References

  • Jolley, Summation of Series, Dover (1961), eq (214) page 40.

Crossrefs

Programs

  • Maple
    seq(2^n*binomial(n,2),n=0..20);
  • Mathematica
    Range[0,20]! CoefficientList[Series[2x^2 Exp[2x],{x,0,20}],x]
    Table[2^n Binomial[n,2],{n,0,30}] (* or *) LinearRecurrence[{6,-12,8},{0,0,4},30] (* Harvey P. Dale, Aug 15 2020 *)
  • PARI
    a(n)=binomial(n,2)<Charles R Greathouse IV, Oct 16 2015

Formula

Sum_{n>=2} 1/a(n) = 1 - log(2) = 0.3068528.... - Graeme McRae, Jul 28 2006
a(n) = Sum_{k=0..n} k*2^k = 2*A001815(n). - Zerinvary Lajos, Oct 09 2006
E.g.f.: 2*x^2*exp(2x).
a(n) = 4*A001788(n-1). - Johannes W. Meijer, Jun 27 2009
Sum_{j=1..k} (j+2)/a(j+1) = 1 - 1/((k+1)*2^k). [Jolley]
G.f.: -4*x^2 / (2*x-1)^3. - R. J. Mathar, Oct 05 2011
Sum_{n>=2} (-1)^n/a(n) = 3*log(3/2) - 1. - Amiram Eldar, Jul 20 2020
From Peter Bala Mar 04 2024: (Start)
Sum_{k = 2..n+2} 1/a(k) = 1/(4 - 4/(7 - 12/(10 - ... - 2*n*(n + 1)/(3*n + 4)))).
Sum_{k = 2..n+2} (-1)^k/a(k) = 1/(4 + 4/(5 + 12/(6 + ... + 2*n*(n + 1)/(n + 4)))).
Letting n -> oo in the above gives the continued fraction representations
1 - log(2) = Sum_{k >= 2} 1/a(k) = 1/(4 - 4/(7 - 12/(10 - ... - 2*n*(n + 1)/((3*n + 4) - ... )))) (an equivalent continued fraction for 1 - log(2) was conjectured by the Ramanujan machine) and
3*log(3/2) - 1 = Sum_{k >= 2} (-1)^k/a(k) = 1/(4 + 4/(5 + 12/(6 + ... + 2*n*(n + 1)/((n + 4) + ... )))). (End)

A129530 a(n) = (1/2)*n*(n-1)*3^(n-1).

Original entry on oeis.org

0, 0, 3, 27, 162, 810, 3645, 15309, 61236, 236196, 885735, 3247695, 11691702, 41452398, 145083393, 502211745, 1721868840, 5854354056, 19758444939, 66248903619, 220829678730, 732224724210, 2416341589893, 7939408081077
Offset: 0

Views

Author

Emeric Deutsch, Apr 22 2007

Keywords

Comments

Number of inversions in all ternary words of length n on {0,1,2}. Example: a(2)=3 because each of the words 10,20,21 has one inversion and the words 00,01,02,11,12,22 have no inversions. a(n)=3*A027472(n+1). a(n)=Sum(k*A129529(n,k),k>=0).

Crossrefs

Programs

  • Maple
    seq(n*(n-1)*3^(n-1)/2,n=0..27);
  • Mathematica
    Table[(n(n-1)3^(n-1))/2,{n,0,30}] (* or *) LinearRecurrence[{9,-27,27},{0,0,3},30] (* Harvey P. Dale, Dec 18 2013 *)
  • PARI
    a(n)=n*(n-1)*3^(n-1)/2 \\ Charles R Greathouse IV, Oct 16 2015

Formula

G.f.: 3x^2/(1-3x)^3.
a(0)=0, a(1)=0, a(2)=3, a(n)=9*a(n-1)-27*a(n-2)+27*a(n-3). - Harvey P. Dale, Dec 18 2013
From Amiram Eldar, Jan 12 2021: (Start)
Sum_{n>=2} 1/a(n) = 2 * (1 - 2 * log(3/2)).
Sum_{n>=2} (-1)^n/a(n) = 2*(4*log(4/3) - 1). (End)
a(n) = 3*A027472(n+1). - R. J. Mathar, Jul 26 2022
Previous Showing 51-60 of 109 results. Next