%I M1576 #148 Sep 24 2024 14:14:31
%S 1,2,6,10,19,28,44,60,85,110,146,182,231,280,344,408,489,570,670,770,
%T 891,1012,1156,1300,1469,1638,1834,2030,2255,2480,2736,2992,3281,3570,
%U 3894,4218,4579,4940,5340,5740,6181,6622,7106,7590,8119,8648,9224,9800
%N Expansion of (1+x^2)/((1-x)^2*(1-x^2)^2).
%C Alkane (or paraffin) numbers l(6,n).
%C Dimension of the space of homogeneous degree n polynomials in (x1, y1, x2, y2) invariant under permutation of variables x1<->y1, x2<->y2.
%C Also multidigraphs with loops on 2 nodes with n arcs (see A138107). - _Vladeta Jovovic_, Dec 27 1999
%C Euler transform of finite sequence [2,3,0,-1]. - _Michael Somos_, Mar 17 2004
%C a(n-2) is the number of plane partitions with trace 2. - _Michael Somos_, Mar 17 2004
%C With offset 4, a(n) is the number of bracelets with n beads, 3 of which are red, 1 of which is blue. For odd n, a(n) = C(n-1,3)/2. For even n, a(n) = C(n-1,3)/2 +(n-2)/4. For n >= 6, with K = (n-1)(n-2)/((n-5)(n-4)), for odd n, a(n) = K*a(n-2). For even n, a(n) = K*a(n-2) -(n-2)/(n-5). - _Washington Bomfim_, Aug 05 2008
%C Equals (1,2,3,4,...) convolved with (1,0,3,0,5,...). - _Gary W. Adamson_, Feb 16 2009
%C Equals row sums of triangle A177878.
%C Equals (1/2)*((1, 4, 10, 20, 35, 56, ...) + (1, 0, 2 0, 3, 0, 4, ...)).
%C From _Ctibor O. Zizka_, Nov 21 2014: (Start)
%C With offset 4, a(n) is the number of different patterns of the 2-color 4-partition of n.
%C P(n)_(k;t) gives the number of different patterns of the t-color, k-partition of n.
%C P(n)_(k;t) = 1 + Sum(i=2..n) Sum(j=2..i) Sum(r=1..m) c_(i,j)*v_r*F_r(X_1,...,X_i).
%C P(n;i;j) = Sum(r=1..m) c_(i,j)*v_r*F_r(X_1,...,X_i).
%C m partition number of i.
%C c_(i,j) number of different coloring patterns on the r-th form (X_1,...,X_i) of i-partition with j-colors.
%C v_r number of i-partitions of n of the r-th form (X_1,...,X_i).
%C F_r(X_1,...,X_i) number of different patterns of the r-th form i-partition of n.
%C Some simple results:
%C P(1)_(k;t)=1, P(2)_(k;t)=2, P(3)_(k;t)=4, P(4)_(k;t)=11, etc.
%C P(n;1;1) = P(n;n;n) = 1 for all n;
%C P(n;2;2) = floor(n/2) (A004526);
%C P(n;3;2) = (n*n - 2*n + n mod 2)/4 (A002620).
%C This sequence is a(n) = P(n;4;2).
%C 2-coloring of 4-partition is (A,B,A,B) or (B,A,B,A).
%C Each 4-partition of n has one of the form (X_1,X_1,X_1,X_1),(X_1,X_1,X_1,X_2), (X_1,X_1,X_2,X_2),(X_1,X_1,X_2,X_3),(X_1,X_2,X_3,X_4).
%C The number of forms is m=5 which is the partition number of k=4.
%C Partition form (X_1,X_1,X_1,X_1) gives 1 pattern ((X_1A,X_1B,X_1A,X_1B), (X_1,X_1,X_1,X_2) gives 2 patterns, (X_1,X_1,X_2,X_2) gives 4 patterns, (X_1,X_1,X_2,X_3) gives 6 patterns and (X_1,X_2,X_3,X_4) gives 12 patterns.
%C Thus
%C a(n) = P(n;4;2) = 1*1*v_1 + 1*2*v_2 + 1*4*v_3 + 1*6*v_4 + 1*12*v_5
%C where v_r is the number of different 4-partitions of the r-th form (X_1,X_2,X_3,X_4) for a given n.
%C Example:
%C The 4-partitions of 8 are (2,2,2,2), (1,1,1,5), (1,1,3,3), (1,1,2,4), and (1,2,2,3):
%C (2,2,2,2) 1 pattern
%C (1,1,1,5), (1,1,5,1) 2 patterns
%C (1,1,3,3), (1,3,3,1), (3,1,1,3), (1,3,1,3) 4 patterns
%C (1,1,2,4), (1,1,4,2), (1,2,1,4), (1,2,4,1), (1,4,1,2), (2,1,1,4) 6 patterns
%C (2,2,1,3), (2,2,3,1), (2,1,2,3), (2,1,3,2), (2,3,2,1), (1,2,2,3) 6 patterns
%C Thus a(8) = P(8,4,2) = 1 + 2 + 4 + 6 + 6 = 19.
%C (End)
%C a(n) = length of run n+2 of consecutive 1's in A254338. - _Reinhard Zumkeller_, Feb 27 2015
%C Take a chessboard of (n+2) X (n+2) unit squares in which the a1 square is black. a(n) is the number of composite squares having black unit squares on their vertices. - _Ivan N. Ianakiev_, Jul 19 2018
%C a(n) is the number of 1423-avoiding odd Grassmannian permutations of size n+2. Avoiding any of the patterns 2314 or 3412 gives the same sequence. - _Juan B. Gil_, Mar 09 2023
%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%D L. Smith, Polynomial Invariants of Finite Groups, A K Peters, 1995, p. 96.
%H T. D. Noe, <a href="/A005993/b005993.txt">Table of n, a(n) for n = 0..1000</a>
%H M. Benoumhani, M. Kolli, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL13/Benoumhani/benoumhani6.html">Finite topologies and partitions</a>, JIS 13 (2010) # 10.3.5, Lemma 6 3rd line.
%H Washington Bomfim, <a href="http://commons.wikimedia.org/wiki/Image:Comentario1Blue3Reds.PNG">The 19 bracelets with 8 beads - one blue, three reds and four blacks.</a> [From _Washington Bomfim_, Aug 05 2008]
%H T. M. Brown, <a href="https://arxiv.org/abs/1810.08235">On the unimodality of convolutions of sequences of binomial coefficients</a>, arXiv:1810.08235 [math.CO] (2018).
%H Johann Cigler, <a href="https://arxiv.org/abs/1711.03340">Some remarks on Rogers-Szegö polynomials and Losanitsch's triangle</a>, arXiv:1711.03340 [math.CO], 2017.
%H Dragomir Z. Djokovic, <a href="https://arxiv.org/abs/math/0609262">Poincaré series of some pure and mixed trace algebras of two generic matrices</a>, arXiv:math/0609262 [math.AC], 2006. See Table 8.
%H Juan B. Gil and Jessica A. Tomasko, <a href="https://arxiv.org/abs/2207.12617">Pattern-avoiding even and odd Grassmannian permutations</a>, arXiv:2207.12617 [math.CO], 2022.
%H Naihuan Jing, Kailash Misra, Carla Savage, <a href="http://arxiv.org/abs/math/9907183">On multi-color partitions and the generalized Rogers-Ramanujan identities</a>, arXiv:math/9907183 [math.CO], 1999.
%H S. M. Losanitsch, <a href="http://dx.doi.org/10.1002/cber.189703002144">Die Isomerie-Arten bei den Homologen der Paraffin-Reihe</a>, Chem. Ber. 30 (1897), 1917-1926.
%H S. M. Losanitsch, <a href="/A000602/a000602_1.pdf">Die Isomerie-Arten bei den Homologen der Paraffin-Reihe</a>, Chem. Ber. 30 (1897), 1917-1926. (Annotated scanned copy)
%H N. J. A. Sloane, <a href="/classic.html#LOSS">Classic Sequences</a>
%H L. Smith, <a href="http://dx.doi.org/10.1090/S0273-0979-97-00724-6">Polynomial invariants of finite groups. A survey of recent developments</a>. Bull. Amer. Math. Soc. (N.S.) 34 (1997), no. 3, 211-250. See page 218. MR1433171 (98i:13009).
%H <a href="/index/Rec#order_06">Index entries for linear recurrences with constant coefficients</a>, signature (2,1,-4,1,2,-1).
%F l(c, r) = 1/2 C(c+r-3, r) + 1/2 d(c, r), where d(c, r) is C((c + r - 3)/2, r/2) if c is odd and r is even, 0 if c is even and r is odd, C((c + r - 4)/2, r/2) if c is even and r is even, C((c + r - 4)/2, (r - 1)/2) if c is odd and r is odd.
%F G.f.: (1+x^2)/((1-x)^2*(1-x^2)^2) = (1+x^2)/((1+x)^2*(x-1)^4) = (1/(1-x)^4 +1/(1-x^2)^2)/2.
%F a(2n) = (n+1)(2n^2+4n+3)/3, a(2n+1) = (n+1)(n+2)(2n+3)/3. a(-4-n) = -a(n).
%F From _Yosu Yurramendi_, Sep 12 2008: (Start)
%F a(n+1) = a(n) + A008794(n+3) with a(1)=1.
%F a(n) = A027656(n) + 2*A006918(n).
%F a(n+2) = a(n) + A000982(n+2) with a(1)=1, a(2)=2. (End)
%F a(n) = 2*a(n-1) + a(n-2) - 4*a(n-3) + a(n-4) + 2*a(n-5) - a(n-6). - _Jaume Oliver Lafont_, Dec 05 2008
%F a(n) = (n^3 + 6*n^2 + 11*n + 6)/12 + ((n+2)/4)[n even] (the bracket means that the second term is added if and only if n is even). - _Benoit Jubin_, Mar 31 2012
%F a(n) = (1/12)*n*(n+1)*(n+2) + (1/4)*(n+1)*(1/2)*(1-(-1)^n), with offset 1. - _Yosu Yurramendi_, Jun 20 2013
%F a(n) = Sum_{i=0..n+1} ceiling(i/2) * round(i/2) = Sum_{i=0..n+2} floor(i/2)^2. - _Bruno Berselli_, Aug 30 2013
%F a(n) = (n + 2)*(3*(-1)^n + 2*n^2 + 8*n + 9)/24. - _Ilya Gutkovskiy_, May 04 2016
%F Recurrence formula: a(n) = ((n+2)*a(n-2)+2*a(n-1)-n)/(n-2), a(1)=1, a(2)=2. - _Gerry Martens_, Jun 10 2018
%F E.g.f.: exp(-x)*(6 - 3*x + exp(2*x)*(18 + 39*x + 18*x^2 + 2*x^3))/24. - _Stefano Spezia_, Feb 23 2020
%F a(n) = Sum_{j=0..n/2} binomial(c+2*j-1,2*j)*binomial(c+n-2*j-1,n-2*j) where c=2. For other values of c we have: A008619 (c=1), A005995 (c=3), A018211 (c=4), A018213 (c=5), A062136 (c=6). - _Miquel A. Fiol_, Sep 24 2024
%e a(2) = 6, since ( x1*y1, x2*y2, x1*x1+y1*y1, x2*x2+y2*y2, x1*x2+y1*y2, x1*y2+x2*y1 ) are a basis for homogeneous quadratic invariant polynomials.
%p g := proc(n) local i; add(floor(i/2)^2,i=1..n+1) end: # Joseph S. Riel (joer(AT)k-online.com), Mar 22 2002
%p a:= n-> (Matrix([[1, 0$3, -1, -2]]).Matrix(6, (i,j)-> if (i=j-1) then 1 elif j=1 then [2, 1, -4, 1, 2, -1][i] else 0 fi)^n)[1,1]; seq (a(n), n=0..44); # _Alois P. Heinz_, Jul 31 2008
%t CoefficientList[Series[(1+x^2)/((1-x)^2*(1-x^2)^2),{x,0,44}],x] (* _Jean-François Alcover_, Apr 08 2011 *)
%t LinearRecurrence[{2,1,-4,1,2,-1},{1,2,6,10,19,28},50] (* _Harvey P. Dale_, Feb 20 2012 *)
%o (Haskell) Following Gary W. Adamson.
%o import Data.List (inits, intersperse)
%o a005993 n = a005994_list !! n
%o a005993_list = map (sum . zipWith (*) (intersperse 0 [1, 3 ..]) . reverse) $
%o tail $ inits [1..]
%o -- _Reinhard Zumkeller_, Feb 27 2015
%o (Magma) I:=[1,2,6,10,19,28]; [n le 6 select I[n] else 2*Self(n-1)+Self(n-2)-4*Self(n-3)+Self(n-4)+2*Self(n-5)-Self(n-6): n in [1..60]]; // _Vincenzo Librandi_, Jul 19 2015
%o (PARI) a(n)=polcoeff((1+x^2)/(1-x)^2/(1-x^2)^2+x*O(x^n),n)
%o (PARI) a(n) = (binomial(n+3, n) + (1-n%2)*binomial((n+2)/2, n>>1))/2 \\ _Washington Bomfim_, Aug 05 2008
%o (PARI) a = vector(50); a[1]=1; a[2]=2;
%o for(n=3, 50, a[n] = ((n+2)*a[n-2]+2*a[n-1]-n)/(n-2)); a \\ _Gerry Martens_, Jun 03 2018
%o (Sage)
%o def A005993():
%o a, b, to_be = 0, 0, True
%o while True:
%o yield (a*(a*(2*a+9)+13)+b*(b+1)*(2*b+1)+6)//6
%o if to_be: b += 1
%o else: a += 1
%o to_be = not to_be
%o a = A005993()
%o [next(a) for _ in range(48)] # _Peter Luschny_, May 04 2016
%Y Cf. A177878.
%Y Partial sums of A008794 (without 0). - _Bruno Berselli_, Aug 30 2013
%Y Cf. A254338, A002260, A005408, A282011.
%Y Cf. A008619, A005995, A018211, A018213, A062136.
%K nonn,easy,nice
%O 0,2
%A _N. J. A. Sloane_, Winston C. Yang (yang(AT)math.wisc.edu)