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.

A002623 Expansion of 1/((1-x)^4*(1+x)).

Original entry on oeis.org

1, 3, 7, 13, 22, 34, 50, 70, 95, 125, 161, 203, 252, 308, 372, 444, 525, 615, 715, 825, 946, 1078, 1222, 1378, 1547, 1729, 1925, 2135, 2360, 2600, 2856, 3128, 3417, 3723, 4047, 4389, 4750, 5130, 5530, 5950, 6391, 6853, 7337, 7843, 8372, 8924, 9500
Offset: 0

Views

Author

Keywords

Comments

Also a(n) is the number of nondegenerate triangles that can be made from rods of lengths 1 to n+1. - Alfred Bruckstein; corrected by Hans Rudolf Widmer, Nov 02 2023
Also number of circumscribable (or escrible) quadrilaterals that can be made from rods of length 1,2,3,4,...,n. - Antreas P. Hatzipolakis (xpolakis(AT)otenet.gr)
Also number of 2 X n binary matrices up to row and column permutation (see the link: Binary matrices up to row and column permutations). - Vladeta Jovovic
Also partial sum of alternate triangular numbers (1, 3, 1+6, 3+10, 1+6+15, 3+10+21, etc.); and also number of triangles pointing in opposite direction to largest triangle in triangular matchstick arrangement of side n+2 (cf. A002717, also the Larsen article). - Henry Bottomley, Aug 08 2000
Ordered union of A002412(n+1) and A016061(n+1). - Lekraj Beedassy, Oct 13 2003
Also Molien series for certain 4-D representation of cyclic group of order 2. - N. J. A. Sloane, Jun 12 2004
From Radu Grigore (radugrigore(AT)gmail.com), Jun 19 2004: (Start)
a(n) = floor( (n+2)*(n+4)*(2n+3) / 24 ). E.g., a(2) = floor(4*6*7/24) = 7 because there are 7 upside down triangles (6 of size one and 1 of size two) in the matchstick figure:
/\
/\/\
/\/\/\
/\/\/\/\
(End)
Number of non-congruent non-parallelogram trapezoids with positive integer sides (trapezints) and perimeter 2n+5. Also with perimeter 2n+8. - Michael Somos, May 12 2005
a(n) = A108561(n+4,n) for n > 0. - Reinhard Zumkeller, Jun 10 2005
Also number of nonisomorphic planes with n points and 2 lines. E.g., a(0)=1 because with no points, we just have two empty lines. a(1)=3 because the one point may belong to 0, 1 or 2 lines. a(2)=7 because there are 7 ways to determine which of 2 points belong to which of 2 lines, up to isomorphism, i.e., up to a bijection f on the sets of points and a bijection g on the sets of lines, such that A belongs to a iff f(A) belongs to g(a). - Bjorn Kjos-Hanssen (bjorn(AT)math.uconn.edu), Nov 10 2005
a(n-2) is the number of ways to pick two non-overlapping subwords of equal nonzero length from a word of length n. E.g., a(5-2)=a(3)=13 since the word 12345 of length 5 has the following subword pairs: 1,2; 1,3; 1,4; 1,5; 2,3; 2,4; 2,5; 3,4; 3,5; 4,5; 12,34; 12,45; 23,45. - Michael Somos, Oct 22 2006
Partial sums of A002620. - G.H.J. van Rees (vanrees(AT)cs.umanitoba.ca), Feb 16 2007
From Philippe LALLOUET (philip.lallouet(AT)orange.fr), Oct 19 2007: (Start)
Also number of squares of any size in a staircase of n steps built with unit squares:
||__
||__|
||__||
For a staircase of 3 steps 6 squares of size 1 and 1 square of size 2, hence c(3)=7.
Columns sums of:
1 3 6 10 15 21 28 ...
1 3 6 10 15 ...
1 3 6 ...
1 ...
---------------------
1 3 7 13 22 34 50 ...
(End)
a(n) = sum of row n+1 of triangle A134446. Also, binomial transform of [1, 2, 2, 0, 1, -2, 4, -8, 16, -32, ...]. - Gary W. Adamson, Oct 25 2007
Let b(n) be the number of 4-tuples (w,x,y,z) having all terms in {1,...,n} and 2w=x+y+z+n; then b(n+3) = a(n) for n >= 0. - Clark Kimberling, May 08 2012
a(n) is the number of 3-tuples (w,x,y) having all terms in {0,...,n} and w >= x+y and x <= y. - Clark Kimberling, Jun 04 2012
Also, number of unlabeled bipartite graphs with two left vertices and n right vertices. - Yavuz Oruc, Jan 14 2018
Also number of triples (x,y,z) with 0 < x <= y <= z <= n + 1, x + y > z. - Ralf Steiner, Feb 06 2020
Bisections A002412 and A016061: a(2*k) = k*(k+1)*(4*k-1)/3! and a(2*k+1) = (k+1)*(k+2)*(4*k+9)/3!, for k >= 0. See the Woolhouse link, II. Solution by Stephen Watson, p. 65, with index shifts. - Mo Li, Apr 02 2020
Also, Wiener index of the square of the path graph P_(n+2). - Allan Bickle, Aug 01 2020
Maximum Wiener index of all maximal 2-degenerate graphs with n+2 vertices. (A maximal 2-degenerate graph can be constructed from a 2-clique by iteratively adding a new 2-leaf (vertex of degree 2) adjacent to two existing vertices.) The extremal graphs are squares of paths, so the bound also applies to 2-trees and maximal outerplanar graphs. - Allan Bickle, Sep 15 2022

Examples

			G.f. = 1 + 3*x + 7*x^2 + 13*x^3 + 22*x^4 + 34*x^5 + 50*x^6 + 70*x^7 + 95*x^8 + ...
		

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 74, Problem 7.
  • P. Diaconis, R. L. Graham and B. Sturmfels, Primitive partition identities, in Combinatorics: Paul Erdős is Eighty, Vol. 2, Bolyai Soc. Math. Stud., 2, 1996, pp. 173-192.
  • H. Gupta, Partitions of j-partite numbers into twelve or a smaller number of parts. Collection of articles dedicated to Professor P. L. Bhatnagar on his sixtieth birthday. Math. Student 40 (1972), 401-441 (1974).
  • I. Siap, Linear codes over F_2 + u*F_2 and their complete weight enumerators, in Codes and Designs (Ohio State, May 18, 2000), pp. 259-271. De Gruyter, 2002.
  • 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. A002620 (first differences), A000292, A001752 (partial sums), A062109 (binomial transf.).
Bisections A002412, A016061.
Cf. also A002717 (a companion sequence), A002727, A006148, A057524, A134446, A014125, A122046, A122047.
The maximum Wiener index of all maximal k-degenerate graphs for k=1..6 are given in A000292, A002623 (this sequence), A014125, A122046, A122047, A175724, respectively.

Programs

  • Maple
    A002623 := n->(1/16)*(1+(-1)^n)+(n+1)/8+binomial(n+2,2)/4+binomial(n+3,3)/2;
    seq( ((2*n+3)*(n+2)*(n+1)/6-floor((n+2)/2))/4,n=1..47); # Lewis
    a := n -> ((-1)^n*3 + 45 + 68*n + 30*n^2 + 4*n^3) / 48:
    seq(a(n), n=0..46); # Peter Luschny, Jan 22 2018
  • Mathematica
    CoefficientList[Series[1/((1-x)^3(1-x^2)),{x,0,50}],x] (* or *) LinearRecurrence[{3,-2,-2,3,-1},{1,3,7,13,22},50] (* Harvey P. Dale, Jul 19 2011 *)
    Table[((2 n^3 + 15 n^2 + 34 n + 45 / 2 + (3/2) (-1)^n) / 24), {n, 0, 100}] (* Vincenzo Librandi, Jan 15 2018 *)
    a[ n_] := Floor[(n + 2)*(n + 4)*(2*n + 3)/24]; (* Michael Somos, Feb 19 2024 *)
  • PARI
    {a(n) = (8 + 34/3*n + 5*n^2 + 2/3*n^3) \ 8}; /* Michael Somos, Sep 04 1999 */
    
  • PARI
    x='x+O('x^50); Vec(1/((1 - x)^3 * (1 - x^2))) \\ Indranil Ghosh, Apr 04 2017
    
  • Python
    def A002623(n): return ((n+2)*(n+4)*((n<<1)+3)>>3)//3 # Chai Wah Wu, Mar 25 2024

Formula

a(n+1) = a(n) + {(k-1)*k if n=2*k} or {k*k if n=2*k+1}.
a(n)+a(n+1) = A000292(n+1).
a(n) = a(n-2) + A000217(n+1) = A002717(n+2) - A000292(n+1).
Also: a(n) = C(n+3, 3) - a(n-1) with a(0)=1. - Labos Elemer, Apr 26 2003
From Paul Barry, Jul 01 2003: (Start)
a(n) = Sum_{k=0..n} (-1)^(n-k)*C(k+3,3).
The signed version 1, -3, 7, ... has the formula:
a(n) = (4*n^3 + 30*n^2 + 68*n + 45)*(-1)^n/48 + 1/16.
This is the partial sums of the signed version of A000292. (End)
From Paul Barry, Jul 21 2003: (Start)
a(n) = Sum_{k=0..n} floor((k+2)^2/4).
a(n) = Sum_{k=0..n} Sum_{j=0..k} Sum_{i=0..j} (1+(-1)^i)/2. (End)
a(n) = a(n - 2) + (n*(n - 1))/2, with n>2, a(1)=0, a(2)=1; a(n) = (4*n^3+6*n^2-4*n+3*(-1)^n-3)/48, with offset 2. - Cecilia Rossiter (cecilia(AT)noticingnumbers.net), Dec 14 2004 (formula simplified by Bruno Berselli, Aug 29 2013)
a(n) = ((2*n+3)*(n+2)*(n+1)/6-floor((n+2)/2))/4, with offset 1. - Jerry W. Lewis (JLewis(AT)wyeth.com), Mar 23 2005
a(n) = 2*a(n-1) - a(n-2) + 1 + floor(n/2). - Bjorn Kjos-Hanssen (bjorn(AT)math.uconn.edu), Nov 10 2005
A002620(n+3) = a(n+1) - a(n). - Michael Somos, Sep 04 1999
Euler transform of length 2 sequence [ 3, 1]. - Michael Somos, Sep 04 2006
a(n) = -a(-5-n) for all n in Z. - Michael Somos, Sep 04 2006
Let P(i,k) be the number of integer partitions of n into k parts, then with k=2 we have a(n) = sum_{m=1}^{n} sum_{i=k}^{m} P(i,k). For k=1 we get A000217 = triangular numbers. - Thomas Wieder, Feb 18 2007
a(n) = (n+(3+(-1)^n)/2)*(n+(7+(-1)^n)/2)*(2*n+5-2*(-1)^n)/24. - Philippe LALLOUET (philip.lallouet(AT)orange.fr), Oct 19 2007 (corrected by Bruno Berselli, Aug 30 2013)
From Johannes W. Meijer, May 20 2011: (Start)
a(n) = A006918(n+1) + A006918(n).
a(n) = A058187(n-2) + 2*A058187(n-1) + A058187(n). (End)
a(0)=1, a(1)=3, a(2)=7, a(3)=13, a(4)=22; for n > 4, a(n) = 3*a(n-1) - 2*a(n-2) - 2*a(n-3) + 3*a(n-4) - a(n-5). - Harvey P. Dale, Jul 19 2011
a(n) = Sum_{i=0..n+2} floor(i/2)*ceiling(i/2). - Bruno Berselli, Aug 30 2013
a(n) = 15/16 + (1/16)*(-1)^n + (17/12)*n + (5/8)*n^2 + (1/12)*n^3. - Robert Israel, Jul 07 2014
a(n) = Sum_{i=0..n+2} (n+1-i)*floor(i/2+1). - Bruno Berselli, Apr 04 2017
a(n) = 1 + floor((2*n^3 + 15*n^2 + 34*n) / 24). - Allan Bickle, Aug 01 2020
E.g.f.: ((24 + 51*x + 21*x^2 + 2*x^3)*cosh(x) + (21 + 51*x + 21*x^2 + 2*x^3)*sinh(x))/24. - Stefano Spezia, Jun 02 2021