cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-2 of 2 results.

A374139 a(n) is the determinant of the symmetric Toeplitz matrix of order n whose element (i,j) equals abs(i-j) or 1 if i = j.

Original entry on oeis.org

1, 1, 0, -1, 1, 3, 0, -3, 1, 5, 0, -5, 1, 7, 0, -7, 1, 9, 0, -9, 1, 11, 0, -11, 1, 13, 0, -13, 1, 15, 0, -15, 1, 17, 0, -17, 1, 19, 0, -19, 1, 21, 0, -21, 1, 23, 0, -23, 1, 25, 0, -25, 1, 27, 0, -27, 1, 29, 0, -29, 1, 31, 0, -31, 1, 33, 0, -33, 1, 35, 0, -35, 1, 37, 0, -37
Offset: 0

Views

Author

Stefano Spezia, Jun 28 2024

Keywords

Comments

A minor variant of A166445. - R. J. Mathar, Jul 01 2024

Examples

			a(4) = 1:
  [1, 1, 2, 3]
  [1, 1, 1, 2]
  [2, 1, 1, 1]
  [3, 2, 1, 1]
		

Crossrefs

Cf. A056594, A071078, A085750, A374140 (permanent).

Programs

  • Mathematica
    a[n_]:=Det[Table[If[i == j, 1, Abs[i - j]], {i, n}, {j, n}]]; Join[{1}, Array[a, 75]]
  • PARI
    a(n) = matdet(matrix(n, n, i, j, if (i==j, 1, abs(i-j)))); \\ Michel Marcus, Jun 29 2024
    
  • Python
    from sympy import Matrix
    def A374139(n): return Matrix(n,n,[abs(j-k) if j!=k else 1 for j in range(n) for k in range(n)]).det() # Chai Wah Wu, Jul 01 2024

Formula

G.f.: (1 + x^2 - x^3 + x^4)/((1 - x)*(1 + x^2)^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) = (1 + A056594(n) + n*A056594(n+1))/2.
E.g.f.: (exp(x) + (1 + x)*cos(x))/2.
For a proof of the generating function and the recursion formula, see MathOverflow link. - Sela Fried, Jul 09 2024

A374278 a(n) is the maximal permanent of an n X n symmetric Toeplitz matrix having 1 on the main diagonal and all the integers 1, 2, ..., n-1 off-diagonal.

Original entry on oeis.org

1, 1, 2, 18, 389, 14284, 798322, 62490160, 6519511313, 873036867840, 145856387327074
Offset: 0

Views

Author

Stefano Spezia, Jul 02 2024

Keywords

Examples

			a(5) = 14284:
  [1, 4, 3, 2, 1]
  [4, 1, 4, 3, 2]
  [3, 4, 1, 4, 3]
  [2, 3, 4, 1, 4]
  [1, 2, 3, 4, 1]
		

Crossrefs

Programs

  • Mathematica
    a[0]=1; a[n_]:=Max[Table[Permanent[ToeplitzMatrix[Join[{1}, Part[Permutations[Range[n - 1]], i]]]], {i, (n-1)!}]]; Array[a, 11, 0]
Showing 1-2 of 2 results.