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.

A001788 a(n) = n*(n+1)*2^(n-2).

Original entry on oeis.org

0, 1, 6, 24, 80, 240, 672, 1792, 4608, 11520, 28160, 67584, 159744, 372736, 860160, 1966080, 4456448, 10027008, 22413312, 49807360, 110100480, 242221056, 530579456, 1157627904, 2516582400, 5452595200, 11777605632, 25367150592, 54492397568, 116769423360, 249644974080, 532575944704
Offset: 0

Views

Author

Keywords

Comments

Number of 2-dimensional faces in (n+1)-dimensional hypercube; also number of 4-cycles in the (n+1)-dimensional hypercube. - Henry Bottomley, Apr 14 2000
Also the number of edges in the (n+1)-halved cube graph. - Eric W. Weisstein, Jun 21 2017
From Philippe Deléham, Apr 28 2004: a(n) is the sum, over all nonempty subsets E of {1, 2, ..., n}, of all elements of E. E.g., a(3) = 24: the nonempty subsets are {1, 2, 3}, {1, 2}, {1, 3}, {2, 3}, {1}, {2}, {3} and 1 + 2 + 3 + 1 + 2 + 1 + 3 + 2 + 3 + 1 + 2 + 3 = 24.
Equivalently, sum of all nodes (except the last one, equal to n+1) of all integer compositions of n+1. - Olivier Gérard, Oct 22 2011
The inverse binomial transform of a(n-k) for k=-1..4 gives A001844, A000290, A000217(n-1), A002620(n-1), A008805(n-4), A000217 interspersed with 0's. - Michael Somos, Jul 18 2003
Take n points on a finite line. They all move with the same constant speed; they instantaneously change direction when they collide with another; and they fall when they quit the line. a(n-1) is the total number of collisions before falling when the initials directions are the 2^n possible. The mean number of collisions is then n(n-1)/8. E.g., a(1)=0 before any collision is possible. a(2)=1 because there is a collision only if the initials directions are, say, right-left. - Emmanuel Moreau, Feb 11 2006
Also number of pericondensed hexagonal systems with n hexagons. For example, if n=5 then the number of pericondensed hexagonal systems with n hexagons is 24. - Parthasarathy Nambi, Sep 06 2006
If X_1,X_2,...,X_n is a partition of a 2n-set X into 2-blocks then, for n>1, a(n-1) is equal to the number of (n+2)-subsets of X intersecting each X_i (i=1,2,...,n). - Milan Janjic, Jul 21 2007
Number of n-permutations of 3 objects u,v,w, with repetition allowed, containing exactly two u's. Example: a(2)=6 because we have uuw, uuv, uwu, uvu, wuu and vuu. - Zerinvary Lajos, Dec 29 2007
For n>0 where [0]={}, the empty set, and [n]={1,2,...n} a(n) is the number of ways to separate [n-1] into three non-overlapping intervals (allowed to be empty) and then choose a subset from each interval. - Geoffrey Critzer, Feb 07 2009
Form an array with m(n,0) = m(0,n) = n^2 and m(i,j) = m(i-1,j-1) + m(i-1,j). Then m(1,n) = A001844(n) and m(n,n) = a(n). - J. M. Bergot, Nov 07 2012
The sum of the number of inversions of all sequences of zeros and ones with length n+1. - Evan M. Bailey, Dec 09 2020
a(n) is the number of strings of length n defined on {0,1,2,3} that contain at most one 2, exactly one 3, and have no restriction on the number of 0s and 1s. For example, a(3)=24 since the strings are 321 (6 of this type), 320 (6 of this type), 310 (6 of this type), 300 (3 of this type) and 311 (3 of this type). - Enrique Navarrete, May 04 2025

Examples

			The nodes of an integer composition are the partial sums of its elements, seen as relative distances between nodes of a 1-dimensional polygon. For a composition of 7 such as 1+2+1+3, the nodes are 0,1,3,4,7. Their sum (without the last node) is 8. The sum of all nodes of all 2^(7-1)=64 integer compositions of 7 is 672.
		

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 796.
  • Clifford A. Pickover, The Math Book, From Pythagoras to the 57th Dimension, 250 Milestones in the History of Mathematics, Sterling Publ., NY, 2009, page 282.
  • A. P. Prudnikov, Yu. A. Brychkov and O.I. Marichev, "Integrals and Series", Volume 1: "Elementary Functions", Chapter 4: "Finite Sums", New York, Gordon and Breach Science Publishers, 1986-1992.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A000079, A001787, A001789, A001793 (sum of all nodes of integer compositions, n included).
Cf. A001844, A038207, A290031 (6-cycles).
Row sums of triangle A094305.
Sequences similar to the form q^(n-2)*binomial(n, 2): A000217 (q=1), this sequence (q=2), A027472 (q=3), A038845 (q=4), A081135 (q=5), A081136 (q=6), A027474 (q=7), A081138 (q=8), A081139 (q=9), A081140 (q=10), A081141 (q=11), A081142 (q=12), A027476 (q=15).

Programs

  • GAP
    List([0..30], n-> n*(n+1)*2^(n-2)); # G. C. Greubel, Aug 27 2019
  • Haskell
    a001788 n = if n < 2 then n else n * (n + 1) * 2 ^ (n - 2)
    a001788_list = zipWith (*) a000217_list $ 1 : a000079_list
    -- Reinhard Zumkeller, Jul 11 2014
    
  • Magma
    [n*(n+1)*2^(n-2): n in [0..30]]; // G. C. Greubel, Aug 27 2019
    
  • Maple
    A001788 := n->n*(n+1)*2^(n-2);
    A001788:=-1/(2*z-1)**3; # Simon Plouffe in his 1992 dissertation; gives sequence without initial zero
  • Mathematica
    CoefficientList[Series[x/(1-2x)^3, {x,0,30}], x]
    Table[n*(n+1)*2^(n-2), {n,0,30}]
    With[{n = 30}, Join[{0}, Times @@@ Thread[{Accumulate[Range[n]], 2^Range[0, n - 1]}]]] (* Harvey P. Dale, Jul 16 2013 *)
    LinearRecurrence[{6, -12, 8}, {0, 1, 6}, 30] (* Harvey P. Dale, Jul 16 2013 *)
  • PARI
    a(n)=if(n<0,0,2^n*n*(n+1)/4)
    
  • PARI
    A001788_upto(n)=Vec(x/(1-2*x)^3+O(x^n),-n) \\ for illustration. - M. F. Hasler, Oct 05 2024
    
  • Sage
    [n if n < 2 else n * (n + 1) * 2**(n - 2) for n in range(28)] # Zerinvary Lajos, Mar 10 2009
    

Formula

G.f.: x/(1-2*x)^3.
E.g.f.: x*(1 + x)*exp(2*x).
a(n) = 2*a(n-1) + n*2^(n-1) = 2*a(n-1) + A001787(n).
a(n) = A038207(n+1,2).
a(n) = A055252(n, 2).
a(n) = Sum_{i=1..n} i^2 * binomial(n, i): binomial transform of A000290. - Yong Kong, Dec 26 2000
a(n) = Sum_{j=0..n} binomial(n+1,j)*(n+1-j)^2. - Zerinvary Lajos, Aug 22 2006
If the leading 0 is deleted, the binomial transform of A001844: (1, 5, 13, 25, 41, ...); = double binomial transform of [1, 4, 4, 0, 0, 0, ...]. - Gary W. Adamson, Sep 02 2007
a(n) = Sum_{1<=i<=k<=n} (-1)^(i+1)*i^2*binomial(n+1,k+i)*binomial(n+1,k-i). - Mircea Merca, Apr 09 2012
a(0)=0, a(1)=1, a(2)=6, a(n) = 6*a(n-1) - 12*a(n-2) + 8*a(n-3). - Harvey P. Dale, Jul 16 2013
a(n) = Sum_{k=0..n-1} Sum_{i=0..n-1} (k+1) * C(n-1,i). - Wesley Ivan Hurt, Sep 20 2017
From Amiram Eldar, Jan 05 2022: (Start)
Sum_{n>=1} 1/a(n) = 4*(1-log(2)).
Sum_{n>=1} (-1)^(n+1)/a(n) = 12*log(3/2) - 4. (End)