[go: up one dir, main page]

login
Search: a322277 -id:a322277
     Sort: relevance | references | number | modified | created      Format: long | short | data
a(n) = (1/2)*(n^3 + n*(n mod 2)).
+10
22
1, 4, 15, 32, 65, 108, 175, 256, 369, 500, 671, 864, 1105, 1372, 1695, 2048, 2465, 2916, 3439, 4000, 4641, 5324, 6095, 6912, 7825, 8788, 9855, 10976, 12209, 13500, 14911, 16384, 17985, 19652, 21455, 23328, 25345, 27436, 29679, 32000, 34481, 37044, 39775, 42592
OFFSET
1,2
COMMENTS
Terms are obtained as partial sums in an algorithm for the generation of the sequence of the fourth powers (A000583). Starting with the sequence of the positive integers (A000027), it is necessary to delete every 4th term and to consider the partial sums of the obtained sequence, then to delete every 3rd term, and lastly to consider again the partial sums (see References).
a(n) is the trace of an n X n square matrix M(n) formed by writing the numbers 1, ..., n^2 successively forward and backward along the rows in zig-zag pattern as shown in the examples below. Specifically, M(n) is defined as M[i,j,n] = j + n*(i-1) if i is odd and M[i,j,n] = n*i - j + 1 if i is even, and it has det(M(n)) = 0 for n > 2 (proved).
From Saeed Barari, Oct 31 2021: (Start)
Also the sum of the entries in an n X n matrix whose elements start from 1 and increase as they approach the center. For instance, in case of n=5, the entries of the following matrix sum to 65:
1 2 3 2 1
2 3 4 3 2
3 4 5 4 3
2 3 4 3 2
1 2 3 2 1. (End)
The n X n square matrix of the preceding comment is defined as: A[i,j,n] = n - abs((n + 1)/2 - j) - abs((n + 1)/2 - i). - Stefano Spezia, Nov 05 2021
REFERENCES
Edward A. Ashcroft, Anthony A. Faustini, Rangaswami Jagannathan, William W. Wadge, Multidimensional Programming, Oxford University Press 1995, p. 12.
G. Polya, Mathematics and Plausible Reasoning: Induction and analogy in mathematics, Princeton University Press 1990, p. 118.
Shailesh Shirali, A Primer on Number Sequences, Universities Press (India) 2004, p. 106.
FORMULA
a(n) = (1/2)*(A000578(n) + n*A000035(n)).
a(n) = A006003(n) - (n/2)*(1 - (n mod 2)).
a(n) = Sum_{k=1..n} T(n,k), where T(n,k) = ((n + 1)*k - n)*(n mod 2) + ((n - 1)*k + 1)*(1 - (n mod 2)).
E.g.f.: E(x) = (1/4)*exp(-x)*x*(1 + 3*exp(2*x) + 6*exp(2*x)*x + 2*exp(2*x)*x^2).
L.g.f.: L(x) = -x*(1 + x^2)/((-1 + x)*(1 + x)^3).
H.l.g.f.: LH(x) = -x*(1 + x^2)/((-1 + x)^3*(1 + x)).
Dirichlet g.f.: (1/2)*(Zeta(-3 + s) + 2^(-s)*(-2 + 2^s)*Zeta(-1 + s)).
From Colin Barker, Aug 02 2018: (Start)
G.f.: x*(1 + 2*x + 6*x^2 + 2*x^3 + x^4) / ((1 - x)^4*(1 + x)^2).
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>6.
a(n) = n^3/2 for n even.
a(n) = (n^3+n)/2 for n odd.
(End)
a(2*n) = A317297(n+1) + A001489(n). - Stefano Spezia, Dec 28 2018
Sum_{n>0} 1/a(n) = (1/2)*(-2*polygamma(0, 1/2) + polygamma(0, (1-i)/2)+ polygamma(0, (1+i)/2)) + zeta(3)/4 approximately equal to 1.3959168891658447368440622669882813003351669... - Stefano Spezia, Feb 11 2019
a(n) = (A000578(n) + A193356(n))/2. - Stefano Spezia, Jun 27 2022
a(n) = A210378(n-1)/n. - Stefano Spezia, Jul 15 2024
EXAMPLE
For n = 1 the matrix M(1) is
1
with trace Tr(M(1)) = a(1) = 1.
For n = 2 the matrix M(2) is
1, 2
4, 3
with Tr(M(2)) = a(2) = 4.
For n = 3 the matrix M(3) is
1, 2, 3
6, 5, 4
7, 8, 9
with Tr(M(3)) = a(3) = 15.
MAPLE
a:=n->(1/2)*(n^3+n*modp(n, 2)): seq(a(n), n=1..50); # Muniru A Asiru, Aug 24 2018
MATHEMATICA
CoefficientList[Series[1/4 E^-x (1 + 3 E^(2 x) + 6 E^(2 x) x + 2 E^(2 x) x^2), {x, 0, 45}], x]*Table[(k + 1)!, {k, 0, 45}]
CoefficientList[Series[-(1 + x^2)/((-1 + x)*(1 + x)^3), {x, 0, 45}], x]*Table[(k + 1)*(-1)^k, {k, 0, 45}]
CoefficientList[Series[-(1 + x^2)/((-1 + x)^3*(1 + x)), {x, 0, 45}], x]*Table[(k + 1), {k, 0, 45}]
From Robert G. Wilson v, Aug 01 2018: (Start)
a[i_, j_, n_] := If[OddQ@ i, j + n (i - 1), n*i - j + 1]; f[n_] := Tr[Table[a[i, j, n], {i, n}, {j, n}]]; Array[f, 45]
CoefficientList[Series[(x^4 + 2x^3 + 6x^2 + 2x + 1)/((x - 1)^4 (x + 1)^2), {x, 0,
45}], x]
LinearRecurrence[{2, 1, -4, 1, 2, -1}, {1, 4, 15, 32, 65, 108}, 45]
(End)
PROG
(R)
for (n in 1:nmax){
a <- (n^3+n*n%%2)/2
output <- c(n, a)
cat(output, "\n")
}
(MATLAB and FreeMat)
for(n=1:nmax); a=(n^3+n*mod(n, 2))/2; fprintf('%d\t%0.f\n', n, a); end
(GAP) a_n:=List([1..nmax], n->(1/2)*(n^3 + n*RemInt(n, 2)));
(Maxima) a(n):=(1/2)*(n^3 + n*mod(n, 2))$ makelist(a(n), n, 1, nmax);
(PARI) Vec(x*(1 + 2*x + 6*x^2 + 2*x^3 + x^4) / ((1 - x)^4*(1 + x)^2) + O(x^40)) \\ Colin Barker, Aug 02 2018
(PARI) M(i, j, n) = if (i % 2, j + n*(i-1), n*i - j + 1);
a(n) = sum(k=1, n, M(k, k, n)); \\ Michel Marcus, Aug 07 2018
(Magma) [IsEven(n) select n^3/2 else (n^3+n)/2: n in [1..50]]; // Vincenzo Librandi, Aug 07 2018
(GAP) List([1..50], n->(1/2)*(n^3+n*(n mod 2))); # Muniru A Asiru, Aug 24 2018
CROSSREFS
Cf. A000583, A000027, A186424 (first differences).
Cf. related to the M matrices: A074147 (antidiagonals), A130130 (rank), A241016 (row sums), A317617 (column sums), A322277 (permanent), A323723 (subdiagonal sums), A323724 (superdiagonal sums).
KEYWORD
nonn,easy
AUTHOR
Stefano Spezia, Aug 01 2018
STATUS
approved
a(n) = (-2 - (-1)^n*(-2 + n) + n + 2*n^3)/4.
+10
6
0, 0, 4, 14, 32, 64, 108, 174, 256, 368, 500, 670, 864, 1104, 1372, 1694, 2048, 2464, 2916, 3438, 4000, 4640, 5324, 6094, 6912, 7824, 8788, 9854, 10976, 12208, 13500, 14910, 16384, 17984, 19652, 21454, 23328, 25344, 27436, 29678, 32000, 34480, 37044, 39774
OFFSET
0,3
COMMENTS
For n > 1, a(n) is the subdiagonal sum of the matrix M(n) whose permanent is A322277(n).
All the terms of this sequence are even numbers (A005843).
FORMULA
O.g.f.: 2*x^2*(2 + 3*x + x^3)/((1 - x)^4*(1 + x)^2).
E.g.f.: (1/4)*exp(-x)*(2 + x)*(1 + exp(2*x)*(-1 + 2*x + 2* x^2)).
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) = (6 + n + n^3 + 12*floor((n - 3)/2) + 4*floor((n - 3)/2)^2 - 2*(1 + n)*floor((n - 1)/2)/2.
a(n) = (-2 - A033999(n)*(-2 + n) + n + A033431(n))/4.
a(n) = n^3/2 for even n; a(n) = (n - 1)*(n^2 + n + 2)/2 otherwise. - Bruno Berselli, Feb 06 2019
a(n) = 2*A004526(n*A000982(n)). [Found by Christian Krause's LODA miner] - Stefano Spezia, Dec 12 2021
MAPLE
a:=n->(-2 - (-1)^n*(-2 + n) + n + 2*n^3)/4: seq(a(n), n=0..50);
MATHEMATICA
a[n_]:=(6 + n + n^3 + 12 Floor[1/2 (-3 + n)] + 4 Floor[1/2 (-3 + n)]^2 - 2 (1 + n) Floor[1/2 (-1 + n)])/2; Array[a, 50, 0]
PROG
(GAP) Flat(List([0..50], n -> (-2-(-1)^n*(-2+n)+n+2*n^3)/4));
(Magma) [(-2-(-1)^n*(-2+n)+n+2*n^3)/4: n in [0..50]];
(Maxima) makelist((-2-(-1)^n*(-2+n)+n+2*n^3)/4, n, 0, 50);
(PARI) a(n) = (-2-(-1)^n*(-2+n)+n+2*n^3)/4;
(Python) [(-2-(-1)**n*(-2+n)+n+2*n**3)/4 for n in range(50)]
KEYWORD
nonn,easy
AUTHOR
Stefano Spezia, Jan 25 2019
STATUS
approved
a(n) = n*(2*(n - 2)*n + (-1)^n + 3)/4.
+10
5
0, 0, 2, 6, 20, 40, 78, 126, 200, 288, 410, 550, 732, 936, 1190, 1470, 1808, 2176, 2610, 3078, 3620, 4200, 4862, 5566, 6360, 7200, 8138, 9126, 10220, 11368, 12630, 13950, 15392, 16896, 18530, 20230, 22068, 23976, 26030, 28158, 30440, 32800, 35322, 37926, 40700
OFFSET
0,3
COMMENTS
For n > 1, a(n) is the superdiagonal sum of the matrix M(n) whose permanent is A322277(n).
All the terms of this sequence are even numbers (A005843), but do not end with 4.
FORMULA
O.g.f.: 2*x^2*(1 + x + 3*x^2 + x^3)/((1 - x)^4*(1 + x)^2).
E.g.f.: (1/2)*x*(exp(x)*x*(1 + x) + sinh(x)).
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) = (1/2)*(-1 + n)^2*n - (-1 + n)*floor(n/2) + 2*floor(n/2)^2.
a(n) = (1/2)*(-1 + n)^2*n - (-1 + n)*A004526(n) + 2*A000290(A004526(n)).
a(n) = (n/2)*((n - 1)^2 + 1) for even n; a(n) = (n/2)*(n - 1)^2 otherwise. - Bruno Berselli, Feb 06 2019
a(n) = 2*A004526(n*A000982(n-1)). [Found by Christian Krause's LODA miner] - Stefano Spezia, Dec 12 2021
a(n) = 2*A005997(n-1) for n >= 2. - Hugo Pfoertner, Dec 13 2021
MAPLE
a:=n->(1/2)*(-1 + n)^2*n - (-1 + n)*floor(n/2) + 2*(floor(n/2))^2: seq(a(n), n=0..50);
MATHEMATICA
a[n_] := 1/2 (-1 + n)^2 n - (-1 + n) Floor[n/2] + 2 Floor[n/2]^2; Array[a, 50, 0];
Table[n (2 (n - 2) n + (-1)^n + 3)/4, {n, 0, 50}] (* Bruno Berselli, Feb 06 2019 *)
LinearRecurrence[{2, 1, -4, 1, 2, -1}, {0, 0, 2, 6, 20, 40}, 50] (* Harvey P. Dale, Jan 13 2024 *)
PROG
(GAP) Flat(List([0..50], n->(1/2)*(-1 + n)^2*n - (-1 + n)*Int(n/2) + 2*(Int(n/2))^2));
(Magma) [(1/2)*(-1 + n)^2*n - (-1 + n)*Floor(n/2) + 2*(Floor(n/2))^2: n in [0..50]];
(Maxima) makelist((1/2)*(-1 + n)^2*n - (-1 + n)*floor(n/2) + 2*(floor(n/2))^2, n, 0, 50);
(PARI) a(n) = (1/2)*(-1 + n)^2*n - (-1 + n)*floor(n/2) + 2*(floor(n/2))^2;
(PARI) T(i, j, n) = if (i %2, j + n*(i-1), n*i - j + 1);
a(n) = sum(k=1, n-1, T(k, k+1, n)); \\ Michel Marcus, Feb 06 2019
(Python) [int((1/2)*(-1 + n)**2*n - (-1 + n)*int(n/2) + 2*(int(n/2))**2) for n in range(0, 50)]
KEYWORD
nonn,easy
AUTHOR
Stefano Spezia, Jan 25 2019
EXTENSIONS
Definition by Bruno Berselli, Feb 06 2019
STATUS
approved
Triangle read by rows: T(n, k) = (1/4)*n*(1 - (-1)^(n - k) + 2*(n - k)^2), with 0 <= k < n.
+10
4
1, 4, 2, 15, 6, 3, 32, 20, 8, 4, 65, 40, 25, 10, 5, 108, 78, 48, 30, 12, 6, 175, 126, 91, 56, 35, 14, 7, 256, 200, 144, 104, 64, 40, 16, 8, 369, 288, 225, 162, 117, 72, 45, 18, 9, 500, 410, 320, 250, 180, 130, 80, 50, 20, 10, 671, 550, 451, 352, 275, 198, 143, 88, 55, 22, 11
OFFSET
1,2
COMMENTS
T(n, k) is the k-superdiagonal sum of the matrix M(n) whose permanent is A322277(n).
FORMULA
O.g.f.: x*(1 - 2*y + y^2 + 2*y^3 + x^4*(1 + y^2) + 2*x^3*(1 + y - 3*y^2 + y^3) + 2*x^2*(3 - 5*y - y^2 + y^3) + x*(2 - 2*y - 6*y^2 + 6*y^3))/((1 - x)^4*(1 + x)^2*(1 - y)^3*(1 + y)).
E.g.f.: (1/4)*exp(-x - y)*(x + exp(2*(x + y))*x*(3 + 2*x^2 + x*(6 - 4*y) - 2*y + 2*y^2)).
T(n, k) = n*(n - k)^2/2 if n and k are both even or odd; T(n, k) = n*(n - k)^2/2 + n/2 otherwise.
1st column: T(n, 1) = A317614(n).
Diagonal: T(n, n-1) = n.
EXAMPLE
The triangle T(n, k) begins:
---+------------------------------
n\k| 0 1 2 3 4
---+------------------------------
1 | 1
2 | 4 2
3 | 15 6 3
4 | 32 20 8 4
5 | 65 40 25 10 5
...
For n = 3 the matrix M(3) is
1, 2, 3
6, 5, 4
7, 8, 9
and therefore T(3, 0) = 1 + 5 + 9 = 15, T(3, 1) = 2 + 4 = 6, and T(3, 2) = 3.
MAPLE
a:=(n, k)->(1/4)*n*(1 - (-1)^(n - k) + 2*(n - k)^2): seq(seq(a(n, k), k=0..n-1), n=1..11);
MATHEMATICA
T[n_, k_] := (1/4) n (1 - (-1)^(n - k) + 2 (n - k)^2); Flatten[Table[T[n, k], {n, 1, 11}, {k, 0, n - 1}]]
PROG
(GAP) Flat(List([1..11], n->List([0..n-1], k->(1/4)*n*(1 - (-1)^(n - k) + 2*(n - k)^2))));
(Magma) [[(1/4)*n*(1 - (-1)^(n - k) + 2*(n - k)^2): k in [0..n-1]]: n in [1..11]];
(PARI) T(n, k) = (1/4)*n*(1 - (-1)^(n - k) + 2*(n - k)^2);
tabl(nn) = for(n=1, nn, for(k=0, n-1, print1(T(n, k), ", ")); print);
tabl(11) \\ yields sequence in triangular form
CROSSREFS
Cf. A000027, A317614, A322277, A325517 (row sums).
KEYWORD
nonn,tabl,easy
AUTHOR
Stefano Spezia, May 07 2019
STATUS
approved
Triangle read by rows: T(n, k) = (1/4)*(2*(-1 + (-1)^n)*k - 2*k^2*n + n*(2 - (-1)^k - (-1)^n + 2*n^2)), with 0 <= k < n.
+10
4
1, 4, 4, 15, 14, 7, 32, 32, 24, 16, 65, 64, 53, 42, 21, 108, 108, 96, 84, 60, 36, 175, 174, 159, 144, 115, 86, 43, 256, 256, 240, 224, 192, 160, 112, 64, 369, 368, 349, 330, 293, 256, 201, 146, 73, 500, 500, 480, 460, 420, 380, 320, 260, 180, 100, 671, 670, 647, 624, 579, 534, 467, 400, 311, 222, 111
OFFSET
1,2
COMMENTS
T(n, k) is the k-subdiagonal sum of the matrix M(n) whose permanent is A322277(n).
FORMULA
O.g.f.: x*(- 1 + 2*y + 3*y^2 - 2*y^3 + 2*x*(- 1 + y^2) + x^4*(- 1 + 3*y^2) + x^2*(- 6 + 6*y + 2*y^2 - 6*y^3) + x^3*(- 2 + 4*y + 2*y^2 - 4*y^3))/((- 1 + x)^4*(1 + x)^2*(- 1 + y)^3*(1 + y)).
E.g.f.: (1/4)*exp(- x - y)*(- exp(2*x)*x + exp(2*y)*(x + 2*y) + 2*exp(2*(x + y))*(3*x^2 + x^3 - y - x*(- 2 + y + y^2))).
T(n, k) = (1/2)*n*(n^2 - k^2) if n and k are both even; T(n, k) = (1/2)*n*(n^2 - k^2 + 1) if n is even and k is odd; T(n, k) = (1/2)*(n*(n^2 - k^2 + 1) - 2*k) if n is odd and k is even; T(n, k) = (1/2)*(n*(n^2 - k^2 + 2) - 2*k) if n and k are both odd.
Diagonal: T(n, n-1) = A325657(n).
1st column: T(n, 0) = A317614(n).
EXAMPLE
The triangle T(n, k) begins:
---+-----------------------------
n\k| 0 1 2 3 4
---+-----------------------------
1 | 1
2 | 4 4
3 | 15 14 7
4 | 32 32 24 16
5 | 65 64 53 42 21
...
For n = 3 the matrix M(3) is
1, 2, 3
6, 5, 4
7, 8, 9
and therefore T(3, 0) = 1 + 5 + 9 = 15, T(3, 1) = 6 + 8 = 14, and T(3, 2) = 7.
MAPLE
a:=(n, k)->(1/4)*(2*(- 1 + (- 1)^n)*k - 2*k^2*n + n*(2 + (- 1)^(1+k) + (- 1)^(1 + n) + 2*n^2)): seq(seq(a(n, k), k=0..n-1), n=1..11);
MATHEMATICA
T[n_, k_]:=(1/4)*(2*(- 1 + (- 1)^n)*k - 2*k^2*n + n*(2 + (- 1)^(1+k) + (- 1)^(1 + n) + 2*n^2)); Flatten[Table[T[n, k], {n, 1, 11}, {k, 0, n-1}]]
PROG
(GAP) Flat(List([1..11], n->List([0..n-1], k->(1/4)*(2*(- 1 + (- 1)^n)*k - 2*k^2*n + n*(2 + (- 1)^(1+k) + (- 1)^(1 + n) + 2*n^2)))));
(Magma) [[(1/4)*(2*(- 1 + (- 1)^n)*k - 2*k^2*n + n*(2 + (- 1)^(1+k) + (- 1)^(1 + n) + 2*n^2)): k in [0..n-1]]: n in [1..11]];
(PARI) T(n, k) = (1/4)*(2*(- 1 + (- 1)^n)*k - 2*k^2*n + n*(2 + (- 1)^(1+k) + (- 1)^(1 + n) + 2*n^2));
tabl(nn) = for(n=1, nn, for(k=0, n-1, print1(T(n, k), ", ")); print);
tabl(11) \\ yields sequence in triangular form
CROSSREFS
Cf. A317614, A322277, A323723 (k = 1), A325656 (row sums), A325657 (diagonal).
KEYWORD
nonn,tabl,easy
AUTHOR
Stefano Spezia, May 13 2019
STATUS
approved
Triangle read by rows: T(n, k) = 1 + k*(n - 1) + (2*k - n - 1)*(k mod 2) with 0 < k <= n.
+10
4
1, 1, 3, 1, 5, 9, 1, 7, 11, 13, 1, 9, 13, 17, 25, 1, 11, 15, 21, 29, 31, 1, 13, 17, 25, 33, 37, 49, 1, 15, 19, 29, 37, 43, 55, 57, 1, 17, 21, 33, 41, 49, 61, 65, 81, 1, 19, 23, 37, 45, 55, 67, 73, 89, 91, 1, 21, 25, 41, 49, 61, 73, 81, 97, 101, 121, 1, 23, 27, 45, 53, 67, 79, 89, 105, 111, 131, 133
OFFSET
1,3
COMMENTS
T(n, k) is the k-th diagonal element of an n X n square matrix M(n) formed by writing the numbers 1, ..., n^2 successively forward and backward along the rows in zig-zag pattern.
It includes exclusively all the odd numbers (A005408). Except the term 1, all the other odd numbers appear a finite number of times.
LINKS
Stefano Spezia, Table of n, a(n) for n = 1..11325 (first 150 rows of the triangle, flattened).
FORMULA
O.g.f.: (1 + y - 3*y^2 + y^3 + x*(-1 - y + 5*y^2 + y^3))/((-1 + x)^2*(-1 + y)^2*(1+y)^2).
E.g.f.: exp(x - y)*(1 + x + 2*y + exp(2*y)*(1 + x*(-1 + 2*y)))/2.
EXAMPLE
1
1, 3
1, 5, 9,
1, 7, 11, 13
1, 9, 13, 17, 25
1, 11, 15, 21, 29, 31
1, 13, 17, 25, 33, 37, 49
...
MATHEMATICA
Table[1+k(n-1)+(2k-n-1)Mod[k, 2], {n, 12}, {k, n}]//Flatten
PROG
(PARI) T(n, k) = 1 + k*(n - 1) + (2*k - n - 1)*(k % 2); \\ Michel Marcus, Jan 25 2021
CROSSREFS
Cf. A005408, A317614 (row sums).
Cf. A000012 (1st column), A006010 (sum of the first n rows), A060747 (2nd column), A074147 (antidiagonals of M matrices), A241016 (row sums of M matrices), A317617 (column sums of M matrices), A322277 (permanent of M matrices), A323723 (subdiagonal sum of M matrices), A323724 (superdiagonal sum of M matrices).
KEYWORD
nonn,tabl
AUTHOR
Stefano Spezia, Jan 22 2021
STATUS
approved
a(n) = (1/12)*n^2*(3*(1 + n^2) - 2*(2 + n^2)*(n mod 2)).
+10
3
0, 0, 5, 6, 68, 50, 333, 196, 1040, 540, 2525, 1210, 5220, 2366, 9653, 4200, 16448, 6936, 26325, 10830, 40100, 16170, 58685, 23276, 83088, 32500, 114413, 44226, 153860, 58870, 202725, 76880, 262400, 98736, 334373, 124950, 420228, 156066, 521645, 192660, 640400, 235340
OFFSET
0,3
COMMENTS
Conjectures: (Start)
For n > 1, a(n) is the absolute value of the trace of the 2nd exterior power of an n X n square matrix M(n) defined as M[i,j,n] = j + n*(i-1) if i is odd and M[i,j,n] = n*i - j + 1 if i is even (see A317614). Equivalently, a(n) is the absolute value of the coefficient of the term [x^(n-2)] in the characteristic polynomial of the matrix M(n), or the absolute value of the sum of all principal minors of M(n) of size 2.
For k > 2, the trace of the k-th exterior power of the matrix M(n) is equal to zero.
(End)
FORMULA
O.g.f.: -x^2*(5 + 6*x + 43*x^2 + 20*x^3 + 43*x^4 + 6*x^5 + 5*x^6)/((-1 + x)^5*(1 + x)^5)).
E.g.f.: (1/(12*x^2))*exp(-x)*(24 - 60*exp(x) + 21*x + 9*x^2 + 2*x^3 + x^4 + exp(2*x)*(36 - 33*x + 15*x^2 - 4*x^3 + 2*x^4)).
a(n) = (1/4)*n^2*(1 + n^2) for n even.
a(n) = (1/2)*A037270(n) for n even.
a(n) = (1/12)*(-1 + n)*n^2*(1 + n) for n odd.
a(n) = A002415(n) for n odd.
a(2*n+1) = 5*a(2*n-1) - 10*a(2*n-3) + 10*a(2*n-5) - 5*a(2*n-7) + a(2*n-9), for n > 4.
a(2*n) = 5*a(2*n-2) - 10*a(2*n-4) + 10*a(2*n-6) - 5*a(2*n-8) + a(2*n-10), for n > 4.
O.g.f. for a(2*n+1): -x*(2*(3 + 10*x + 3*x^2))/(-1 + x)^5.
O.g.f. for a(2*n): x*(-5 - 43*x - 43*x^2 - 5*x^3)/(-1 + x)^5.
E.g.f. for a(2*n+1): (1/12)*(6*x*cosh(sqrt(x)) + sqrt(x)*(6 + x)*sinh(sqrt(x))).
E.g.f. for a(2*n): (1/4)*(x*(8 + x)*cosh(sqrt(x)) + 2*sqrt(x)*(1 + 3*x)*sinh(sqrt(x))).
Sum_{k>=1} 1/a(2*k) = (1/6)*(12 + Pi^2 - 6*Pi*coth(Pi/2)) = 0.21955691692893092525407699347398665248691900...
Sum_{k>=1} 1/a(2*k+1) = 3*(5 - Pi^2/2) = 0.1955933983659620717482635001857732970...
Sum_{k>=2} 1/a(k) = 17 - (4*Pi^2)/3 - Pi*coth(Pi/2) = 0.415150315294892997002340493659759949516369894...
MAPLE
a:=n->(1/12)*n^2*(3*(1 + n^2) - 2*(2 + n^2)*modp(n, 2)): seq(a(n), n=0..50);
MATHEMATICA
a[n_]:=(1/12)*n^2*(3*(1 + n^2) - 2*(2 + n^2)*Mod[n, 2]); Array[a, 50, 0]
PROG
(GAP) Flat(List([0..50], n->(1/12)*n^2*(3*(1 + n^2) - 2*(2 + n^2)*(n mod 2))));
(Magma) [IsEven(n) select (1/4)*n^2*(1 + n^2) else (1/12)*(- 1 + n)*n^2*(1 + n): n in [0..50]];
(Maxima) a(n):=(1/12)*n^2*(3*(1 + n^2) - 2*(2 + n^2)*mod(n, 2))$ makelist(a(n), n, 0, 50);
(PARI) a(n) = (1/12)*n^2*(3*(1 + n^2) - 2*(2 + n^2)*(n % 2));
(PARI) a(n) = abs(polcoeff(charpoly(matrix(n, n, i, j, if (i %2, j + n*(i-1), n*i - j + 1))), n-2)); \\ Michel Marcus, Feb 06 2019
(Python) [int(n**2*(3*(1 + n**2) - 2*(2 + n**2)*pow(n, 1, 2))/12) for n in range(0, 50)]
CROSSREFS
Cf. A317614 (trace of matrix M(n)).
Cf. A002415, A037270, A074147 (antidiagonals of M matrices), A241016 (row sums of M matrices), A317617 (column sums of M matrices), A322277 (permanent of matrix M(n)), A323723 (subdiagonal sum of M matrices), A323724 (superdiagonal sum of M matrices), A325516 (k-superdiagonal sum of M matrices), A325655 (k-subdiagonal sum of M matrices).
KEYWORD
nonn,easy
AUTHOR
Stefano Spezia, Dec 28 2018
STATUS
approved
a(n) = n*((2*n + 1)*(2*n^2 + 2*n + 3) - 3*(-1)^n)/24.
+10
2
0, 1, 6, 24, 64, 145, 282, 504, 832, 1305, 1950, 2816, 3936, 5369, 7154, 9360, 12032, 15249, 19062, 23560, 28800, 34881, 41866, 49864, 58944, 69225, 80782, 93744, 108192, 124265, 142050, 161696, 183296, 207009, 232934, 261240, 292032, 325489, 361722, 400920, 443200
OFFSET
0,3
COMMENTS
For n > 0, a(n) is the n-th row sum of the triangle A325516.
FORMULA
O.g.f.: x*(1 + 3*x + 7*x^2 + 3*x^3 + 2*x^4)/((1 - x)^5*(1 + x)^2).
E.g.f.: (1/24)*exp(-x)*x*(3 + 21*exp(2*x) + 54*exp(2*x)*x + 30*exp(2*x)*x^2 + 4*exp(2*x)*x^3).
a(n) = 3*a(n-1) - a(n-2) - 5*a(n-3) + 5*a(n-4) + a(n-5) - 3*a(n-6) + a(n-7) for n > 6.
a(n) = n^2*(2*n^2 + 3*n + 4)/12 if n is even.
a(n) = n*(n + 1)*(2*n^2 + n + 3)/12 if n is odd.
a(n) = n*A131941(n). - Stefano Spezia, Dec 21 2021
MAPLE
a:=n->n*((2*n + 1)*(2*n^2 + 2*n + 3) - 3*(-1)^n)/24: seq(a(n), n=0..50);
MATHEMATICA
a[n_]:=n*((2*n + 1)*(2*n^2 + 2*n + 3) - 3*(-1)^n)/24; Array[a, 50, 0]
PROG
(GAP) Flat(List([0..50], n->n*((2*n + 1)*(2*n^2 + 2*n + 3) - 3*(-1)^n)/24));
(Magma) [n*((2*n + 1)*(2*n^2 + 2*n + 3) - 3*(-1)^n)/24: n in [0..50]];
(PARI) a(n) = n*((2*n + 1)*(2*n^2 + 2*n + 3) - 3*(-1)^n)/24;
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Stefano Spezia, May 07 2019
STATUS
approved
a(n) = (1/24)*n*((4*n + 3)*(2*n^2 + 1) - 3*(-1)^n).
+10
2
0, 1, 8, 36, 104, 245, 492, 896, 1504, 2385, 3600, 5236, 7368, 10101, 13524, 17760, 22912, 29121, 36504, 45220, 55400, 67221, 80828, 96416, 114144, 134225, 156832, 182196, 210504, 242005, 276900, 315456, 357888, 404481, 455464, 511140, 571752, 637621, 709004, 786240
OFFSET
0,3
COMMENTS
For n > 0, a(n) is the n-th row sum of the triangle A325655.
FORMULA
O.g.f.: -x*(1 + 5*x + 13*x*2 + 9*x^3 + 4*x^4)/((-1 + x)^5*(1 + x)^2).
E.g.f.: (1/24)*exp(-x)*x*(3 + 21*exp(2*x) + 78*exp(2*x)*x + 54*exp(2*x)*x^2 + 8*exp(2*x)*x*3).
a(n) = a(n) = 3*a(n-1) - a(n-2) - 5*a(n-3) + 5*a(n-4) + a(n-5) - 3*a(n-6) + a(n-7) for n > 6.
a(n) = (1/12)*n^2*(4*n^2 + 3*n + 2) if n is even.
a(n) = (1/12)*n*(n + 1)*(4*n^2 - n + 3) if n is odd.
a(n) = n*A173722(2*n). - Stefano Spezia, Dec 21 2021
MAPLE
a:=n->(1/24)*n*(3 - 3*(- 1)^n + 4*n + 6*n^2 + 8*n^3): seq(a(n), n=0..50);
MATHEMATICA
a[n_]:=(1/24)*n*(3 - 3*(- 1)^n + 4*n + 6*n^2 + 8*n^3); Array[a, 50, 0]
PROG
(GAP) Flat(List([0..50], n->(1/24)*n*(3 - 3*(- 1)^n + 4*n + 6*n^2 + 8*n^3)));
(Magma) [(1/24)*n*(3 - 3*(- 1)^n + 4*n + 6*n^2 + 8*n^3): n in [0..50]];
(PARI) a(n) = (1/24)*n*(3 - 3*(- 1)^n + 4*n + 6*n^2 + 8*n^3);
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Stefano Spezia, May 13 2019
STATUS
approved
a(n) = (1/2)*(-1 + (-1)^n)*(n-1) + n^2.
+10
1
0, 1, 4, 7, 16, 21, 36, 43, 64, 73, 100, 111, 144, 157, 196, 211, 256, 273, 324, 343, 400, 421, 484, 507, 576, 601, 676, 703, 784, 813, 900, 931, 1024, 1057, 1156, 1191, 1296, 1333, 1444, 1483, 1600, 1641, 1764, 1807, 1936, 1981, 2116, 2163, 2304, 2353, 2500, 2551
OFFSET
0,3
COMMENTS
For n > 0, a(n) is the n-th element of the diagonal of the triangle A325655. Equivalently, a(n) is the element M_{n,1} of the matrix M(n) whose permanent is A322277(n).
FORMULA
O.g.f.: (-1 - 3*x - x^2 - 3*x^3)/((-1 + x)^3*(1+x)^2).
E.g.f.: (1/2)*exp(-x)*(-1 - x + exp(2*x)*(1 + x + 2*x^2)).
a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5) for n > 4
a(n) = n^2 if n is even.
a(n) = n^2 - n + 1 if n is odd.
MAPLE
a:=n->(1/24)*n*(3 - 3*(- 1)^n + 4*n + 6*n^2 + 8*n^3): seq(a(n), n=0..55);
MATHEMATICA
Table[(1/2)*(- 1+(-1)^n)*(n-1)+n^2, {n, 0, 55}]
PROG
(GAP) Flat(List([0..55], n->(1/2)*(- 1 + (- 1)^n)*(n - 1) + n^2));
(Magma) [(1/2)*(- 1 + (- 1)^n)*(n - 1) + n^2: n in [0..55]];
(PARI) a(n) = (1/2)*(- 1 + (- 1)^n)*(n - 1) + n^2;
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Stefano Spezia, May 13 2019
STATUS
approved

Search completed in 0.008 seconds