Displaying 31-39 of 39 results found.
Number of (w,x,y,z) with all terms in {1,...,n} and 2|w-x|=n+|y-z|.
+10
2
0, 0, 4, 8, 24, 40, 76, 112, 176, 240, 340, 440, 584, 728, 924, 1120, 1376, 1632, 1956, 2280, 2680, 3080, 3564, 4048, 4624, 5200, 5876, 6552, 7336, 8120, 9020, 9920, 10944, 11968, 13124, 14280, 15576, 16872, 18316, 19760, 21360, 22960
COMMENTS
For a guide to related sequences, see A211795.
FORMULA
a(n)=2*a(n-1)+a(n-2)-4*a(n-3)+a(n-4)+2*a(n-5)-a(n-6).
G.f.: (4*x^2 + 4*x^4)/(1 - 2*x - x^2 + 4*x^3 - x^4 - 2*x^5 + x^6).
MATHEMATICA
t = Compile[{{n, _Integer}}, Module[{s = 0},
(Do[If[2 Abs[w - x] == n + Abs[y - z], s = s + 1],
{w, 1, #}, {x, 1, #}, {y, 1, #}, {z, 1, #}] &[n]; s)]];
Map[t[#] &, Range[0, 40]] (* A212686 *)
LinearRecurrence[{2, 1, -4, 1, 2, -1}, {0, 0, 4, 8, 24, 40}, 40]
The number of trees with 4 nodes labeled by positive integers, where each tree's label sum is n.
+10
2
2, 4, 10, 17, 30, 44, 67, 91, 126, 163, 213, 265, 333, 403, 491, 582, 693, 807, 944, 1084, 1249, 1418, 1614, 1814, 2044, 2278, 2544, 2815, 3120, 3430, 3777, 4129, 4520, 4917, 5355, 5799, 6287, 6781, 7321, 7868, 8463, 9065, 9718, 10378, 11091, 11812, 12588, 13372, 14214, 15064
COMMENTS
Computed by the sum over the A000055(4)=2 shapes of the trees: the linear graph of the n-Butane, and the star graph of (1)-Methyl-Propane.
FORMULA
G.f.: x^4*(2+2*x+2*x^2+x^3+x^4)/((1+x)^2*(x-1)^4*(1+x+x^2) ).
EXAMPLE
a(4)=2 because there is a linear tree with all labels equal 1 and the star tree with all labels equal to 1.
MAPLE
x^4*(2+2*x+2*x^2+x^3+x^4)/(1+x)^2/(x-1)^4/(1+x+x^2) ;
taylor(%, x=0, 80) ;
gfun[seriestolist](%) ;
Chessboard rectangles sequence (see Comments), also A037270 interleaved with A163102.
+10
2
0, 0, 1, 2, 10, 18, 45, 72, 136, 200, 325, 450, 666, 882, 1225, 1568, 2080, 2592, 3321, 4050, 5050, 6050, 7381, 8712, 10440, 12168, 14365, 16562, 19306, 22050, 25425, 28800, 32896, 36992, 41905, 46818, 52650, 58482, 65341, 72200, 80200, 88200, 97461, 106722, 117370
COMMENTS
Take a chessboard of n X n unit squares in which the a1 square is black. a(n) is the number of composite rectangles of p x q unit squares whose vertices are covered by black unit squares (1 < p <= n, 1 < q <= n).
FORMULA
a(n) = 2*a(n-1) + 2*a(n-2) - 6*a(n-3) + 6*a(n-5) - 2*a(n-6) - 2*a(n-7) + a(n-8), with a(1)=0, a(2)=0, a(3)=1, a(4)=2, a(5)=10, a(6)=18, a(7)=45, a(8)=72.
G.f.: -(x^3*(1+ 4*x^2 + x^4))/((-1+x)^5*(1+x)^3).
a(n) = (5 - 5*(-1)^n - 12*n + 12*(-1)^n*n + 14*n^2 - 6*(-1)^n*n^2 - 8*n^3 + 2*n^4)/64.
E.g.f.: (1/64)*exp(-x)*(-5-6*x-6*x^2+exp(2*x)*(5-4*x+4*x^2+4*x^3+2*x^4)). - Stefano Spezia, Aug 14 2019
EXAMPLE
In a 4 X 4 chessboard there are two such rectangles (for both p=q=3) and the coordinates of their lower left vertices are a1 and b2). Therefore, a(4)=2.
MATHEMATICA
CoefficientList[Series[-((x^2 (1+4 x^2+x^4))/((-1+x)^5 (1+x)^3)), {x, 0, 44}], x]
LinearRecurrence[{2, 2, -6, 0, 6, -2, -2, 1}, {0, 0, 1, 2, 10, 18, 45, 72}, 80] (* Vincenzo Librandi, Aug 06 2018 *)
PROG
(Magma) [(5-5*(-1)^n-12*n+12*(-1)^n*n+14*n^2-6*(-1)^n*n^2-8*n^3+2*n^4)/64: n in [1..50]]; // Vincenzo Librandi, Aug 05 2018
(Python)
n, a = 0, 0
while n < 10:
print(n, a)
(PARI) a(n) = sum(i = 1, n-1, floor(i/2)^3); \\ Jinyuan Wang, Aug 12 2019
Number of planar partitions of n with trace 4.
+10
1
1, 2, 6, 14, 33, 64, 127, 228, 404, 672, 1100, 1724, 2661, 3974, 5849, 8402, 11911, 16556, 22751, 30772, 41198, 54436, 71283, 92316, 118609, 150950, 190753, 239090, 297783, 368236, 452782, 553240, 672532, 812980, 978211, 1171144, 1396235
COMMENTS
Also number of partitions of n objects of 2 colors into 4 parts, each part containing at least one black object.
REFERENCES
G. E. Andrews, The Theory of Partitions, Addison-Wesley, 1976 (Ch. XI, exercise 5 and Ch. XII, exercise 5).
FORMULA
G.f.: q^4*(q^12+q^10+2*q^9+4*q^8+2*q^7+4*q^6+2*q^5+4*q^4+2*q^3+q^2+1) / ((-1+q^4)^2*(-1+q^3)^2*(-1+q^2)^2*(-1+q)^2).
Rectangular array R by antidiagonals: R(m,n) = floor((m*n+1)/2).
+10
1
1, 1, 1, 2, 2, 2, 2, 3, 3, 2, 3, 4, 5, 4, 3, 3, 5, 6, 6, 5, 3, 4, 6, 8, 8, 8, 6, 4, 4, 7, 9, 10, 10, 9, 7, 4, 5, 8, 11, 12, 13, 12, 11, 8, 5, 5, 9, 12, 14, 15, 15, 14, 12, 9, 5, 6, 10, 14, 16, 18, 18, 18, 16, 14, 10, 6, 6, 11, 15, 18, 20, 21, 21, 20, 18, 15, 11, 6, 7, 12, 17, 20, 23, 24, 25, 24
COMMENTS
Old name was: R(m,n) = number of white squares.
EXAMPLE
Northwest corner:
1 1 2 2 3 3 4 4
1 2 3 4 5 6 7 8
2 3 5 6 8 9 11 12
2 4 6 8 10 12 14 16
CROSSREFS
Antidiagonal sums: (1,2,6,10,19,...)= A005993.
Number of 3-element subsets of S = {1..n} whose sum is odd.
+10
1
0, 0, 0, 0, 2, 4, 10, 16, 28, 40, 60, 80, 110, 140, 182, 224, 280, 336, 408, 480, 570, 660, 770, 880, 1012, 1144, 1300, 1456, 1638, 1820, 2030, 2240, 2480, 2720, 2992, 3264, 3570, 3876, 4218, 4560, 4940, 5320, 5740, 6160, 6622, 7084, 7590, 8096, 8648, 9200
COMMENTS
There are two cases: n is odd and n is even.
Let n be an odd integer and n > 3, the sum of 3 integers is odd when all of them are odd or one is odd and the others are even. Number of ways to choose 3 odd numbers: C((n+1)/2, 3). Number of ways to choose 2 even numbers and 1 odd: C((n-1)/2, 2)*C((n+1)/2, 1). Total number of ways: C((n+1)/2, 3) + C((n-1)/2, 2)*C((n+1)/2,1).
Let n be an even integer and n > 3. Number of ways to choose 3 odd numbers: C(n/2, 3). Number of ways to choose 2 even numbers and 1 odd: C(n/2, 2)*C(n/2, 1). Total number of ways: C(n/2, 3) + C(n/2, 2)*C(n/2, 1).
Take a chessboard of n X n unit squares in which the a1 square is black. a(n) is the number of composite squares having white unit squares on their vertices. For the number of composite squares having black unit squares on their vertices see A005993. - Ivan N. Ianakiev, Aug 19 2018
FORMULA
a(n) = C((n+1)/2, 3) + C((n-1)/2, 2)*C((n+1)/2,1) when n is odd.
a(n) = C(n/2, 3) + C(n/2, 2)*C(n/2, 1) when n is even.
a(n) = 2*a(n-1) + a(n-2) - 4*a(n-3) + a(n-4) + 2*a(n-5) - a(n-6) for n>5.
a(n) = n*(n - 1)*(n - 2)/12 for n even.
a(n) = (n - 1)*(n + 1)*(n - 3)/12 for n odd.
G.f.: 2*x^4 / ((1-x)^4*(1+x)^2). (End)
a(n) = ((-1)^n)*(-1+n)*(3 - 3*(-1)^n - 4*((-1)^n)*n + 2*((-1)^n)*n^2)/24. - Ivan N. Ianakiev, Aug 19 2018
EXAMPLE
For n = 5 then a(5) = 4. The subsets are: {1, 2, 4}, {1, 3, 5}, {2, 3, 4}, {2, 4, 5}.
MATHEMATICA
Table[Binomial[(n + #)/2, 3] + Binomial[(n - #)/2, 2] Binomial[(n + #)/2, 1] &@ Boole@ OddQ@ n, {n, 0, 49}] (* or *)
CoefficientList[Series[2 x^4/((1 - x)^4*(1 + x)^2), {x, 0, 49}], x] (* Michael De Vlieger, Jan 07 2017 *)
PROG
(PARI) concat(vector(4), Vec(2*x^4 / ((1-x)^4*(1+x)^2) + O(x^60))) \\ Colin Barker, Dec 28 2016
Number of 1423-avoiding even Grassmannian permutations of size n.
+10
1
1, 1, 1, 3, 5, 11, 17, 29, 41, 61, 81, 111, 141, 183, 225, 281, 337, 409, 481, 571, 661, 771, 881, 1013, 1145, 1301, 1457, 1639, 1821, 2031, 2241, 2481, 2721, 2993, 3265, 3571, 3877, 4219, 4561, 4941, 5321, 5741, 6161, 6623, 7085, 7591, 8097, 8649, 9201, 9801, 10401
COMMENTS
A permutation is said to be Grassmannian if it has at most one descent. A permutation is even if it has an even number of inversions.
Avoiding any of the patterns 2314 or 3412 gives the same sequence.
FORMULA
G.f.: -(x^5-x^4-4*x^3+2*x^2+x-1)/((x+1)^2*(x-1)^4).
a(n) = 1 - 5*n/24 + n^3/12 - (-1)^n * n/8. - Robert Israel, Mar 10 2023
EXAMPLE
For n=4 the a(4) = 5 permutations are 1234, 1342, 2314, 3124, 3412.
MAPLE
seq(1 - 5*n/24 + n^3/12 - (-1)^n * n/8, n = 0 .. 100); # Robert Israel, Mar 10 2023
CROSSREFS
For the corresponding odd permutations, cf. A005993.
a(n) is the number of non-unimodal sequences with n nonzero terms that arise as a convolution of sequences of binomial coefficients preceded by a finite number of ones.
+10
0
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 5, 7, 12, 16, 24, 30, 41, 50, 65, 77, 96, 112, 136, 156, 185, 210, 245, 275, 316, 352, 400, 442, 497, 546, 609, 665, 736, 800, 880, 952, 1041, 1122, 1221, 1311, 1420, 1520, 1640, 1750, 1881, 2002, 2145, 2277, 2432, 2576, 2744, 2900, 3081, 3250, 3445, 3627, 3836, 4032
COMMENTS
For integers x,y,p,q >= 0, set (s_i)_{i>=1} to be the sequence of p ones followed by the binomial coefficients C(x,j) for 0 <= j <= x followed by an infinite string of zeros, and set (t_i)_{i>=1} to be the sequence of q ones followed by the binomial coefficients C(y,j) for 0 <= j <= y followed by an infinite string of zeros. Then a(n) is the number of non-unimodal sequences (r_i)_{i>=1} where r_i = Sum_{j=1..i} s_j*t_{i-j} for some(s_i) and (t_i) such that x + y + p + q + 1 = n.
Let T be a rooted tree created by identifying the root vertices of two broom graphs. a(n) is the number of trees T on n vertices whose poset of connected, vertex-induced subgraphs is not rank unimodal.
FORMULA
a(n+10) = 2*(Sum_{i=1..n/2} floor(i*(i+4)/4)) - floor(n^2/16) for n even.
a(n+10) = 2*(Sum_{i=1..(n-1)/2} floor(i(i+4)/4)) - floor((n-1)^2/16) + floor((n+1)*(n+9)/16) for n odd.
MATHEMATICA
Table[If[EvenQ[n], 2*(Sum[Floor[i(i+4)/4], {i, 0, (n/2)}]) - Floor[n^2/16], 2*(Sum[Floor[i(i+4)/4], {i, 0, (n-1)/2}]) - Floor[(n-1)^2/16] + Floor[(n+1)(n+9)/16]], {n, 0, 40}]
a(n) is the hafnian of the 2n X 2n symmetric matrix defined by M[i, j] = min(i, j)*(2*n + 1) - i*j.
+10
0
1, 1, 17, 1177, 210249, 76961257, 50203153993, 53127675356625, 85252003916011889, 197131843368693693937, 631233222450168374457057
COMMENTS
M(n-1)/n is the inverse of the Cartan matrix for SU(n): the special unitary group of degree n.
The elements sum of the matrix M(n) is A002415(n+1).
The antidiagonal sum of the matrix M(n) is A005993(n-1).
The n-th row of A107985 gives the row or column sums of the matrix M(n+1).
REFERENCES
E. B. Dynkin, Semisimple subalgebras of semisimple Lie algebras, Am. Math. Soc. Translations, Series 2, Vol. 6, 1957.
FORMULA
Conjecture: det(M(n)) = A000272(n+1).
The conjecture is true (see proof in Links). - Stefano Spezia, May 24 2023
EXAMPLE
a(2) = 17:
[4, 3, 2, 1]
[3, 6, 4, 2]
[2, 4, 6, 3]
[1, 2, 3, 4]
MATHEMATICA
M[i_, j_, n_]:=Part[Part[Table[Min[r, c](n+1)-r c, {r, n}, {c, n}], i], j]; a[n_]:=Sum[Product[M[Part[PermutationList[s, 2n], 2i-1], Part[PermutationList[s, 2n], 2i], 2n], {i, n}], {s, SymmetricGroup[2n]//GroupElements}]/(n!*2^n); Array[a, 6, 0]
PROG
(PARI) tm(n) = matrix(n, n, i, j, min(i, j)*(n + 1) - i*j);
a(n) = my(m = tm(2*n), s=0); forperm([1..2*n], p, s += prod(j=1, n, m[p[2*j-1], p[2*j]]); ); s/(n!*2^n); \\ Michel Marcus, May 02 2023
Search completed in 0.026 seconds
|