|
|
A005993
|
|
Expansion of (1+x^2)/((1-x)^2*(1-x^2)^2).
(Formerly M1576)
|
|
39
|
|
|
1, 2, 6, 10, 19, 28, 44, 60, 85, 110, 146, 182, 231, 280, 344, 408, 489, 570, 670, 770, 891, 1012, 1156, 1300, 1469, 1638, 1834, 2030, 2255, 2480, 2736, 2992, 3281, 3570, 3894, 4218, 4579, 4940, 5340, 5740, 6181, 6622, 7106, 7590, 8119, 8648, 9224, 9800
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
COMMENTS
|
Alkane (or paraffin) numbers l(6,n).
Dimension of the space of homogeneous degree n polynomials in (x1, y1, x2, y2) invariant under permutation of variables x1<->y1, x2<->y2.
Euler transform of finite sequence [2,3,0,-1]. - Michael Somos, Mar 17 2004
a(n-2) is the number of plane partitions with trace 2. - Michael Somos, Mar 17 2004
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
Equals (1,2,3,4,...) convolved with (1,0,3,0,5,...). - Gary W. Adamson, Feb 16 2009
Equals row sums of triangle A177878.
Equals (1/2)*((1, 4, 10, 20, 35, 56, ...) + (1, 0, 2 0, 3, 0, 4, ...)).
With offset 4, a(n) is the number of different patterns of the 2-color 4-partition of n.
P(n)_(k;t) gives the number of different patterns of the t-color, k-partition of n.
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).
P(n;i;j) = Sum(r=1..m) c_(i,j)*v_r*F_r(X_1,...,X_i).
m partition number of i.
c_(i,j) number of different coloring patterns on the r-th form (X_1,...,X_i) of i-partition with j-colors.
v_r number of i-partitions of n of the r-th form (X_1,...,X_i).
F_r(X_1,...,X_i) number of different patterns of the r-th form i-partition of n.
Some simple results:
P(1)_(k;t)=1, P(2)_(k;t)=2, P(3)_(k;t)=4, P(4)_(k;t)=11, etc.
P(n;1;1) = P(n;n;n) = 1 for all n;
P(n;3;2) = (n*n - 2*n + n mod 2)/4 (A002620).
This sequence is a(n) = P(n;4;2).
2-coloring of 4-partition is (A,B,A,B) or (B,A,B,A).
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).
The number of forms is m=5 which is the partition number of k=4.
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.
Thus
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
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.
Example:
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):
(2,2,2,2) 1 pattern
(1,1,1,5), (1,1,5,1) 2 patterns
(1,1,3,3), (1,3,3,1), (3,1,1,3), (1,3,1,3) 4 patterns
(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
(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
Thus a(8) = P(8,4,2) = 1 + 2 + 4 + 6 + 6 = 19.
(End)
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
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
|
|
REFERENCES
|
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
L. Smith, Polynomial Invariants of Finite Groups, A K Peters, 1995, p. 96.
|
|
LINKS
|
|
|
FORMULA
|
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.
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.
a(2n) = (n+1)(2n^2+4n+3)/3, a(2n+1) = (n+1)(n+2)(2n+3)/3. a(-4-n) = -a(n).
a(n+1) = a(n) + A008794(n+3) with a(1)=1.
a(n+2) = a(n) + A000982(n+2) with a(1)=1, a(2)=2. (End)
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
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
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
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
a(n) = (n + 2)*(3*(-1)^n + 2*n^2 + 8*n + 9)/24. - Ilya Gutkovskiy, May 04 2016
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
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
|
|
EXAMPLE
|
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.
|
|
MAPLE
|
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
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
|
|
MATHEMATICA
|
CoefficientList[Series[(1+x^2)/((1-x)^2*(1-x^2)^2), {x, 0, 44}], x] (* Jean-François Alcover, Apr 08 2011 *)
LinearRecurrence[{2, 1, -4, 1, 2, -1}, {1, 2, 6, 10, 19, 28}, 50] (* Harvey P. Dale, Feb 20 2012 *)
|
|
PROG
|
(Haskell) Following Gary W. Adamson.
import Data.List (inits, intersperse)
a005993 n = a005994_list !! n
a005993_list = map (sum . zipWith (*) (intersperse 0 [1, 3 ..]) . reverse) $
tail $ inits [1..]
(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
(PARI) a(n)=polcoeff((1+x^2)/(1-x)^2/(1-x^2)^2+x*O(x^n), n)
(PARI) a(n) = (binomial(n+3, n) + (1-n%2)*binomial((n+2)/2, n>>1))/2 \\ Washington Bomfim, Aug 05 2008
(PARI) a = vector(50); a[1]=1; a[2]=2;
for(n=3, 50, a[n] = ((n+2)*a[n-2]+2*a[n-1]-n)/(n-2)); a \\ Gerry Martens, Jun 03 2018
(Sage)
a, b, to_be = 0, 0, True
while True:
yield (a*(a*(2*a+9)+13)+b*(b+1)*(2*b+1)+6)//6
if to_be: b += 1
else: a += 1
to_be = not to_be
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy,nice
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|