A353452
a(n) is the determinant of the n X n symmetric matrix M(n) that is defined as M[i,j] = abs(i - j) if min(i, j) < max(i, j) <= 2*min(i, j), and otherwise 0.
Original entry on oeis.org
1, 0, -1, 0, 1, -4, 12, 64, -172, -1348, 3456, 34240, -87084, 370640, -872336, -22639616, 52307088, -181323568, 399580288, 23627011200, -51305628400, -686160247552, 1545932859328, 68098264912128, -155370174372864, 6326621032802304, -13829529077133312, -1087288396552040448
Offset: 0
a(8) = -172:
0, 1, 0, 0, 0, 0, 0, 0;
1, 0, 1, 2, 0, 0, 0, 0;
0, 1, 0, 1, 2, 3, 0, 0;
0, 2, 1, 0, 1, 2, 3, 4;
0, 0, 2, 1, 0, 1, 2, 3;
0, 0, 3, 2, 1, 0, 1, 2;
0, 0, 0, 3, 2, 1, 0, 1;
0, 0, 0, 4, 3, 2, 1, 0.
-
Join[{1},Table[Det[Table[If[Min[i,j]
-
a(n) = matdet(matrix(n, n, i, j, if ((min(i,j) < max(i,j)) && (max(i,j) <= 2*min(i,j)), abs(i-j)))); \\ Michel Marcus, Apr 20 2022
-
from sympy import Matrix
def A353452(n): return Matrix(n, n, lambda i, j: abs(i-j) if min(i,j)Chai Wah Wu, Aug 29 2023
A353453
a(n) is the permanent of the n X n symmetric matrix M(n) that is defined as M[i,j] = abs(i - j) if min(i, j) < max(i, j) <= 2*min(i, j), and otherwise 0.
Original entry on oeis.org
1, 0, 1, 0, 1, 4, 64, 576, 7844, 63524, 882772, 11713408, 252996564, 5879980400, 184839020672, 5698866739200, 229815005974352, 9350598794677712, 480306381374466176, 23741710999960266176, 1446802666239931811472, 86153125248221968292928, 6197781268948296566634304
Offset: 0
a(8) = 7844:
0, 1, 0, 0, 0, 0, 0, 0;
1, 0, 1, 2, 0, 0, 0, 0;
0, 1, 0, 1, 2, 3, 0, 0;
0, 2, 1, 0, 1, 2, 3, 4;
0, 0, 2, 1, 0, 1, 2, 3;
0, 0, 3, 2, 1, 0, 1, 2;
0, 0, 0, 3, 2, 1, 0, 1;
0, 0, 0, 4, 3, 2, 1, 0.
-
Join[{1},Table[Permanent[Table[If[Min[i,j]
-
a(n) = matpermanent(matrix(n, n, i, j, if ((min(i,j) < max(i,j)) && (max(i,j) <= 2*min(i,j)), abs(i-j)))); \\ Michel Marcus, Apr 20 2022
-
from sympy import Matrix
def A353453(n): return Matrix(n, n, lambda i, j: abs(i-j) if min(i,j)Chai Wah Wu, Aug 29 2023
A062870
Number of permutations of degree n with greatest sum of distances.
Original entry on oeis.org
1, 1, 1, 3, 4, 20, 36, 252, 576, 5184, 14400, 158400, 518400, 6739200, 25401600, 381024000, 1625702400, 27636940800, 131681894400, 2501955993600, 13168189440000, 276531978240000, 1593350922240000, 36647071211520000, 229442532802560000, 5736063320064000000
Offset: 0
(4,3,1,2) has distances (3,1,2,2), sum is 8 and there are 3 other permutations of degree 4 {3, 4, 1, 2}, {3, 4, 2, 1}, {4, 3, 2, 1} with this sum which is the maximum possible.
-
a:= proc(n) option remember; `if`(n<2, 1+n*(n-1),
(n*((n-1)^2*(3*n-4)*a(n-2)-4*a(n-1)))/(4*(n-1)*(3*n-7)))
end:
seq(a(n), n=0..30); # Alois P. Heinz, Jan 16 2014
-
a[n_?EvenQ] := (n/2)!^2; a[n_?OddQ] := n*((n-1)/2)!^2; Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Apr 15 2015 *)
-
for(k=0,20,print1((2*k+1)*k!^2","(k+1)!^2",")) \\ Herman Jamke (hermanjamke(AT)fastmail.fm), Dec 27 2007
More terms from Herman Jamke (hermanjamke(AT)fastmail.fm), Dec 27 2007
A123956
Triangle of coefficients of polynomials P(k) = 2*X*P(k - 1) - P(k - 2), P(0) = -1, P(1) = 1 + X, with twisted signs.
Original entry on oeis.org
-1, 1, 1, -1, -2, -2, 1, -3, 4, 4, -1, 4, 8, -8, -8, 1, 5, -12, -20, 16, 16, -1, -6, -18, 32, 48, -32, -32, 1, -7, 24, 56, -80, -112, 64, 64, -1, 8, 32, -80, -160, 192, 256, -128, -128, 1, 9, -40, -120, 240, 432, -448, -576, 256, 256, -1, -10, -50, 160, 400, -672, -1120, 1024, 1280, -512, -512
Offset: 0
Triangle begins:
{-1},
{ 1, 1},
{-1, -2, -2},
{ 1, -3, 4, 4},
{-1, 4, 8, -8, -8},
{ 1, 5, -12, -20, 16, 16},
{-1, -6, -18, 32, 48, -32, -32},
{ 1, -7, 24, 56, -80, -112, 64, 64},
{-1, 8, 32, -80, -160, 192, 256, -128, -128},
{ 1, 9, -40, -120, 240, 432, -448, -576, 256, 256},
{-1, -10, -50, 160, 400, -672, -1120, 1024, 1280, -512, -512},
...
- CRC Standard Mathematical Tables and Formulae, 16th ed. 1996, p. 484.
- M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 799.
- M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards, Applied Math. Series 55, Tenth Printing, 1972 [alternative scanned copy].
- Lutterbach, Approximating ODE y' = f(t,y) by using leapfrog method, Mathematics Stack Exchange, Nov 21 2019
- Alastair MacDougall, 83.31 A Pascal-like triangle for coefficients of Chebyshev polynomials">, The Mathematical Gazette, Vol. 83, Issue 497 (Jul 1999), pp. 276-280.
-
p[ -1, x] = 0; p[0, x] = 1; p[1, x] = x + 1;
p[k_, x_] := p[k, x] = 2*x*p[k - 1, x] - p[k - 2, x];
w = Table[CoefficientList[p[n, x], x], {n, 0, 10}];
An[d_] := Table[If[n == d && m 1/y)] /. 1/y -> 1, y], {d, 1, 11}] // Flatten
-
P=List([-1,1-'x]); {A123956(n,k)=for(i=#P, n+1, listput(P, P[i-1]-2*'x*P[i])); polcoef(P[n+1],k)*(-1)^((n-k-1)\2+!k*n\2)} \\ M. F. Hasler, Nov 30 2022
A131476
a(n) = floor(n^3/3).
Original entry on oeis.org
0, 0, 2, 9, 21, 41, 72, 114, 170, 243, 333, 443, 576, 732, 914, 1125, 1365, 1637, 1944, 2286, 2666, 3087, 3549, 4055, 4608, 5208, 5858, 6561, 7317, 8129, 9000, 9930, 10922, 11979, 13101, 14291, 15552, 16884, 18290, 19773, 21333, 22973
Offset: 0
A131479
a(n) = floor(n^4/4).
Original entry on oeis.org
0, 0, 4, 20, 64, 156, 324, 600, 1024, 1640, 2500, 3660, 5184, 7140, 9604, 12656, 16384, 20880, 26244, 32580, 40000, 48620, 58564, 69960, 82944, 97656, 114244, 132860, 153664, 176820, 202500, 230880, 262144, 296480, 334084, 375156
Offset: 0
-
[Floor(n^4/4): n in [0..60]]; // Vincenzo Librandi, Jun 16 2011
-
seq(op([4*k^4, 2*(k^3*(k+1)+k*(k+1)^3)]),k=0..100); # Robert Israel, Jun 01 2015
-
Table[Floor[n^4/4], {n, 0, 20}] (* Enrique Pérez Herrero, May 31 2015 *)
-
vector(50, n, n--; n^4\4) \\ Michel Marcus, Jun 02 2015
-
def A131479(n): return n**4>>2 # Chai Wah Wu, Jan 31 2023
A215098
a(0)=0, a(1)=1, a(n) = n*(n-1) - a(n-2).
Original entry on oeis.org
0, 1, 2, 5, 10, 15, 20, 27, 36, 45, 54, 65, 78, 91, 104, 119, 136, 153, 170, 189, 210, 231, 252, 275, 300, 325, 350, 377, 406, 435, 464, 495, 528, 561, 594, 629, 666, 703, 740, 779, 820, 861, 902, 945, 990, 1035, 1080, 1127, 1176, 1225, 1274, 1325, 1378, 1431
Offset: 0
Cf.
A007590 (a(0)=0, a(n) = n*(n-1) - a(n-1)).
Cf.
A178218 (a(1)=1, a(n) = n*(n+1) - a(n-1)).
-
[n le 2 select n-1 else 2*Binomial(n-1,2) -Self(n-2): n in [1..81]]; // G. C. Greubel, Nov 25 2022
-
CoefficientList[Series[(x -x^2 +3x^3 -x^4)/(1 -3x +4x^2 -4x^3 +3x^4 -x^5), {x, 0, 70}], x] (* Vincenzo Librandi, Jul 18 2013 *)
RecurrenceTable[{a[0]==0,a[1]==1,a[n]==n(n-1)-a[n-2]},a,{n,60}] (* or *) LinearRecurrence[{3,-4,4,-3,1},{0,1,2,5,10},60] (* Harvey P. Dale, May 15 2016 *)
-
prpr = 0
prev = 1
for n in range(2,77):
print(prpr, end=', ')
curr = n*(n-1) - prpr
prpr = prev
prev = curr
-
def A215098(n):
if (n<2): return n
else: return 2*binomial(n,2) - A215098(n-2)
[A215098(n) for n in range(81)] # G. C. Greubel, Nov 25 2022
A241685
The total number of squares and rectangles appearing in the Thue-Morse sequence logical matrices after n stages.
Original entry on oeis.org
0, 2, 4, 18, 60, 242, 924, 3698, 14620, 58482, 233244, 932978, 3729180, 14916722, 59655964, 238623858, 954451740, 3817806962, 15271053084, 61084212338, 244336150300, 977344601202, 3909375608604
Offset: 0
- G. C. Greubel, Table of n, a(n) for n = 0..1000
- Kival Ngaokrajang, Illustration of initial terms
- Kival Ngaokrajang, Illustration for n = 6
- Wikipedia, Thue-Morse sequence
- Index entries for linear recurrences with constant coefficients, signature (4, 5, -20, -4, 16).
-
Table[Floor[(2^(n + 2) + 3 - (-1)^n)^2/72], {n, 0, 50}] (* G. C. Greubel, Sep 29 2017 *)
-
{for (n=1,50, b=(2^(n+1)+3+(-1)^n)/6; a=floor(b^2/2); print1(a,","))}
Original entry on oeis.org
1, -1, 2, 2, -4, 3, -2, 8, -9, 4, 3, -12, 21, -16, 5, -3, 18, -39, 44, -25, 6, 4, -24, 66, -96, 80, -36, 7, -4, 32, -102, 184, -200, 132, -49, 8, 5, -40, 150, -320, 430, -372, 203, -64, 9, -5, 50, -210, 520, -830, 888, -637, 296, -81, 10, 6, -60, 285, -800, 1480, -1884, 1673, -1024, 414, -100, 11
Offset: 0
1;
-1, 2;
2, -4, 3;
-2, 8, -9, 4;
3, -12, 21, -16, 5;
-3, 18, -39, 44, -25, 6;
4, -24, 66, -96, 80, -36, 7;
-4, 32, -102, 184, -200, 132, -49, 8;
5, -40, 150, -320, 430, -372, 203, -64, 9;
-5, 50, -210, 520, -830, 888, -637, 296, -81, 10
-
T(n,k)=(k+1)*sum(i=0,n-k,(-1)^i*binomial(i+k+1,k+1))
for(n=0,15,for(k=0,n,print1(T(n,k),", ")))
A274106
Triangle read by rows: T(n,k) = total number of configurations of k nonattacking bishops on the white squares of an n X n chessboard (0 <= k <= n-1+[n=0]).
Original entry on oeis.org
1, 1, 1, 2, 1, 4, 2, 1, 8, 14, 4, 1, 12, 38, 32, 4, 1, 18, 98, 184, 100, 8, 1, 24, 188, 576, 652, 208, 8, 1, 32, 356, 1704, 3532, 2816, 632, 16, 1, 40, 580, 3840, 12052, 16944, 9080, 1280, 16, 1, 50, 940, 8480, 38932, 89256, 93800, 37600, 3856, 32, 1, 60, 1390, 16000, 98292, 322848, 540080, 412800, 116656, 7744, 32
Offset: 0
Triangle begins:
1;
1;
1, 2;
1, 4, 2;
1, 8, 14, 4;
1, 12, 38, 32, 4;
1, 18, 98, 184, 100, 8;
1, 24, 188, 576, 652, 208, 8;
1, 32, 356, 1704, 3532, 2816, 632, 16;
1, 40, 580, 3840, 12052, 16944, 9080, 1280, 16;
1, 50, 940, 8480, 38932, 89256, 93800, 37600, 3856, 32;
1, 60, 1390, 16000, 98292, 322848, 540080, 412800, 116656, 7744, 32;
...
From _Eder G. Santos_, Dec 16 2024: (Start)
For example, for n = 3, k = 2, the T(3,2) = 2 nonattacking configurations are:
+---+---+---+ +---+---+---+
| | B | | | | | |
+---+---+---+ +---+---+---+
| | | | , | B | | B |
+---+---+---+ +---+---+---+
| | B | | | | | |
+---+---+---+ +---+---+---+
(End)
- Irving Kaplansky and John Riordan, The problem of the rooks and its applications, Duke Mathematical Journal 13.2 (1946): 259-268. See Section 9.
- Irving Kaplansky and John Riordan, The problem of the rooks and its applications, in Combinatorics, Duke Mathematical Journal, 13.2 (1946): 259-268. See Section 9. [Annotated scanned copy]
- J. Perott, Sur le problème des fous, Bulletin de la S. M. F., tome 11 (1883), pp. 173-186.
- Eder G. Santos, Counting non-attacking chess pieces placements: Bishops and Anassas. arXiv:2411.16492 [math.CO], 2024. (considered as black board).
- Eric Weisstein's World of Mathematics, White Bishop Graph.
-
with(combinat): with(gfun):
T := n -> add(stirling2(n+1,n+1-k)*x^k, k=0..n):
# bishops on white squares
bish := proc(n) local m,k,i,j,t1,t2; global T;
if n=0 then return [1] fi;
if (n mod 2) = 0 then m:=n/2;
t1:=add(binomial(m,k)*T(2*m-1-k)*x^k, k=0..m);
else
m:=(n-1)/2;
t1:=add(binomial(m,k)*T(2*m-k)*x^k, k=0..m+1);
fi;
seriestolist(series(t1,x,2*n+1));
end:
for n from 0 to 12 do lprint(bish(n)); od:
-
T[n_] := Sum[StirlingS2[n+1, n+1-k]*x^k, {k, 0, n}];
bish[n_] := Module[{m, t1, t2}, If[Mod[n, 2] == 0,
m = n/2; t1 = Sum[Binomial[m, k]*T[2*m-1-k]*x^k, {k, 0, m}],
m = (n-1)/2; t1 = Sum[Binomial[m, k]*T[2*m - k]*x^k, {k, 0, m+1}]];
CoefficientList[t1 + O[x]^(2*n+1), x]];
Table[bish[n], {n, 1, 12}] // Flatten (* Jean-François Alcover, Jul 25 2022, after Maple code *)
-
def stirling2_negativek(n, k):
if k < 0: return 0
else: return stirling_number2(n, k)
print([sum([binomial(floor(n/2), j)*stirling2_negativek(n-j, n-k) for j in [0..k]]) for n in [0..10] for k in [0..n-1+kronecker_delta(n,0)]]) # Eder G. Santos, Dec 01 2024
Comments