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-9 of 9 results.

A356483 a(n) is the hafnian of a symmetric Toeplitz matrix M(2*n) whose first row consists of prime(1), prime(2), ..., prime(2*n).

Original entry on oeis.org

1, 3, 55, 2999, 347391, 69702479, 22441691645, 10776262328919, 7190279422736061, 6439969796874334809, 7447188585071730451961
Offset: 0

Views

Author

Stefano Spezia, Aug 09 2022

Keywords

Examples

			a(2) = 55 because the hafnian of
    2  3  5  7
    3  2  3  5
    5  3  2  3
    7  5  3  2
equals M_{1,2}*M_{3,4} + M_{1,3}*M_{2,4} + M_{1,4}*M_{2,3} = 55.
		

Crossrefs

Cf. A356490 (determinant of M(n)), A356491 (permanent of M(n)).

Programs

  • Mathematica
    k[i_]:=Prime[i]; M[i_, j_, n_]:=Part[Part[ToeplitzMatrix[Array[k, 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]
  • PARI
    tm(n) = my(m = matrix(n, n, i, j, if (i==1, prime(j), if (j==1, prime(i))))); for (i=2, n, for (j=2, n, m[i, j] = m[i-1, j-1]; ); ); m;
    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

Extensions

a(6) from Michel Marcus, May 02 2023
a(7)-a(10) from Pontus von Brömssen, Oct 14 2023

A356481 a(n) is the hafnian of a symmetric Toeplitz matrix M(2*n) whose first row consists of 1, 2, ..., 2*n.

Original entry on oeis.org

1, 2, 21, 532, 24845, 1856094, 203076097, 30633787976, 6097546660185, 1548899852221210, 489114616743840461
Offset: 0

Views

Author

Stefano Spezia, Aug 09 2022

Keywords

Examples

			a(2) = 21 because the hafnian of
    1  2  3  4
    2  1  2  3
    3  2  1  2
    4  3  2  1
equals M_{1,2}*M_{3,4} + M_{1,3}*M_{2,4} + M_{1,4}*M_{2,3} = 21.
		

Crossrefs

Cf. A001792 (absolute value of the determinant of M(n)), A204235 (permanent of M(n)).

Programs

  • Mathematica
    k[i_]:=i; M[i_, j_, n_]:=Part[Part[ToeplitzMatrix[Array[k, 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]
  • PARI
    tm(n) = my(m = matrix(n, n, i, j, if (i==1, j, if (j==1, i)))); for (i=2, n, for (j=2, n, m[i, j] = m[i-1, j-1]; ); ); m;
    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

Extensions

a(6) from Michel Marcus, May 02 2023
a(7)-a(10) from Pontus von Brömssen, Oct 14 2023

A356482 a(n) is the hafnian of a symmetric Toeplitz matrix M(2*n) whose first row consists of 2*n, 2*n-1, ..., 1.

Original entry on oeis.org

1, 1, 16, 714, 62528, 9056720, 1960138560, 592615689904, 238560786221056, 123358665203311104, 79683847063011614720
Offset: 0

Views

Author

Stefano Spezia, Aug 09 2022

Keywords

Examples

			a(2) = 16 because the hafnian of
    4  3  2  1
    3  4  3  2
    2  3  4  3
    1  2  3  4
equals M_{1,2}*M_{3,4} + M_{1,3}*M_{2,4} + M_{1,4}*M_{2,3} = 16.
		

Crossrefs

Cf. A001792 (determinant of M(n)), A307783.

Programs

  • Mathematica
    k[i_]:=i; M[i_, j_, n_]:=Part[Part[ToeplitzMatrix[Reverse[Array[k, 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]
  • PARI
    tm(n) = my(m = matrix(n, n, i, j, if (i==1, n-j+1, if (j==1, n-i+1)))); for (i=2, n, for (j=2, n, m[i, j] = m[i-1, j-1]; ); ); m;
    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

Extensions

a(6) from Michel Marcus, May 02 2023
a(7)-a(10) from Pontus von Brömssen, Oct 14 2023

A356492 a(n) is the determinant of a symmetric Toeplitz matrix M(n) whose first row consists of prime(n), prime(n-1), ..., prime(1).

Original entry on oeis.org

1, 2, 5, 51, 264, 19532, -11904, 1261296, -2052864, 70621632, 24618221568, 3996020736, 743171562496, 24567175118848, -1257930752000, 864893030400, 12289833785344000, 1099483729459478528, 100515455071223808, 757166323365314560, 6294658173770137600, 7801939905505132544
Offset: 0

Views

Author

Stefano Spezia, Aug 09 2022

Keywords

Comments

Conjecture: a(n) is prime only for n = 1 and 2.
Conjecture is true because a(n) is even for n >= 4. This is because all but two rows of the matrix consist of odd numbers. - Robert Israel, Oct 13 2023

Examples

			For n = 1 the matrix M(1) is
    2
with determinant a(1) = 2.
For n = 2 the matrix M(2) is
    3, 2
    2, 3
with determinant a(2) = 5.
For n = 3 the matrix M(3) is
    5, 3, 2
    3, 5, 3
    2, 3, 5
with determinant a(3) = 51.
		

Crossrefs

Cf. A033286 (trace of the matrix M(n)), A356484 (hafnian of the matrix M(2*n)), A356493 (permanent of the matrix M(n)).

Programs

  • Maple
    f:=proc(n) uses LinearAlgebra; local i;
     Determinant(ToeplitzMatrix([seq(ithprime(i),i=n..1,-1)],symmetric));
    end proc:
    q(0):= 1:
    map(q, [$0..25]); # Robert Israel, Oct 13 2023
  • Mathematica
    k[i_]:=Prime[i]; M[ n_]:=ToeplitzMatrix[Reverse[Array[k, n]]]; a[n_]:=Det[M[n]]; Join[{1},Table[a[n],{n,21}]]
  • PARI
    a(n) = matdet(apply(prime, matrix(n,n,i,j,n-abs(i-j)))); \\ Michel Marcus, Aug 12 2022

Formula

A350955(n) <= a(n) <= A350956(n).

A356493 a(n) is the permanent of a symmetric Toeplitz matrix M(n) whose first row consists of prime(n), prime(n-1), ..., prime(1).

Original entry on oeis.org

1, 2, 13, 271, 12030, 1346758, 214022024, 51763672608, 16088934953136, 6611717516842608, 4412314619046451200, 3533754988232088933120, 3506189715435673999194112, 4444138735439968822425464576, 5893766827264238066914528545792, 8502284313901016361834901076874240, 15350799440394462109333953415858960384
Offset: 0

Views

Author

Stefano Spezia, Aug 09 2022

Keywords

Comments

Conjecture: a(n) is prime only for n = 1, 2, and 3.
Conjecture is true because a(n) is even for n >= 4. This is because a(n) == A356492(n) (mod 2), and all but two rows of the matrix consist of odd numbers. - Robert Israel, Oct 13 2023

Examples

			For n = 1 the matrix M(1) is
    2
with permanent a(1) = 2.
For n = 2 the matrix M(2) is
    3, 2
    2, 3
with permanent a(2) = 13.
For n = 3 the matrix M(3) is
    5, 3, 2
    3, 5, 3
    2, 3, 5
with permanent a(3) = 271.
		

Crossrefs

Cf. A033286 (trace of the matrix M(n)), A356484 (hafnian of the matrix M(2*n)), A356492 (determinant of the matrix M(n)).

Programs

  • Mathematica
    k[i_]:=Prime[i]; M[ n_]:=ToeplitzMatrix[Reverse[Array[k, n]]]; a[n_]:=Permanent[M[n]]; PrimeQ[Join[{1},Table[a[n],{n,16}]]]
  • PARI
    a(n) = matpermanent(apply(prime, matrix(n,n,i,j,n-abs(i-j)))); \\ Michel Marcus, Aug 12 2022

Formula

A351021(n) <= a(n) <= A351022(n).

A357279 a(n) is the hafnian of the 2n X 2n symmetric matrix defined by M[i, j] = i + j - 1.

Original entry on oeis.org

1, 2, 43, 2610, 312081, 61825050, 18318396195, 7586241152490, 4184711271725985, 2965919152834367730, 2626408950849351178875
Offset: 0

Views

Author

Stefano Spezia, Sep 25 2022

Keywords

Comments

The n X n matrix M is the n-th principal submatrix of A002024 considered as an array, and it is singular for n > 2.

Examples

			a(2) = 43 because the hafnian of
    1  2  3  4
    2  3  4  5
    3  4  5  6
    4  5  6  7
equals M_{1,2}*M_{3,4} + M_{1,3}*M_{2,4} + M_{1,4}*M_{2,3} = 43.
		

Crossrefs

Cf. A002024, A002415 (absolute value of the coefficient of x^(n-2) in the characteristic polynomial of M(n)), A095833 (k-th super- and subdiagonal sums of the matrix M(n)), A204248 (permanent of M(n)).

Programs

  • Mathematica
    M[i_, j_, n_]:=Part[Part[Table[r+c-1,{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]
  • PARI
    tm(n) = matrix(n, n, i, j, i+j-1);
    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

Extensions

a(6) from Michel Marcus, May 02 2023
a(7)-a(10) from Pontus von Brömssen, Oct 14 2023

A357419 a(n) is the hafnian of the 2n X 2n symmetric Pascal matrix defined by M[i, j] = A007318(i + j - 2, i - 1).

Original entry on oeis.org

1, 1, 17, 4929, 23872137, 1901611778409, 2469317979267366913, 52019468048773355156225921, 17726418489020770628047341494927089, 97518325438289444681986165275143492027985129, 8648473129650550498122567373327602114148485950241817345
Offset: 0

Views

Author

Stefano Spezia, Sep 27 2022

Keywords

Examples

			a(2) = 17 because the hafnian of
    1,  1,  1,   1
    1,  2,  3,   4
    1,  3,  6,  10
    1,  4, 10,  20
equals M_{1,2}*M_{3,4} + M_{1,3}*M_{2,4} + M_{1,4}*M_{2,3} = 17.
		

Crossrefs

Cf. A007318.
Cf. A006134 (trace of M(n)), A095833 (k-th super- and subdiagonal sums of M(n)), A320845 (permanent of M(n)).

Programs

  • Mathematica
    M[i_, j_, n_]:=Part[Part[Table[Binomial[r+c-2,r-1], {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]

Extensions

a(6)-a(10) from Pontus von Brömssen, Oct 14 2023

A357420 a(n) is the hafnian of the 2n X 2n symmetric matrix defined by 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, 1, 1, 8, 86, 878, 13730, 348760, 11622396, 509566864, 26894616012, 1701189027944, 125492778658096, 10738546182981256, 1049631636279244832, 117756049412699967072
Offset: 0

Views

Author

Stefano Spezia, Sep 27 2022

Keywords

Examples

			a(4) = 86:
    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.
		

Crossrefs

Cf. A000982 (number of zero matrix elements of M(n)), A003983, A007590 (number of positive matrix elements of M(n)), A049581, A051125, A352967, A353452 (determinant of M(n)), A353453 (permanent of M(n)).

Programs

  • Mathematica
    M[i_, j_, n_] := If[Min[i, j] < Max[i, j] <= 2 Min[i, j], Abs[j - i], 0]; a[n_] := Sum[Product[M[Part[PermutationList[s, 2 n], 2 i - 1], Part[PermutationList[s, 2 n], 2 i], 2 n], {i, n}], {s, SymmetricGroup[2 n] // GroupElements}]/(n!*2^n); Array[a, 6, 0]

Extensions

a(6)-a(15) from Pontus von Brömssen, Oct 16 2023

A357421 a(n) is the hafnian of the 2n X 2n symmetric matrix whose generic element M[i,j] is equal to the digital root of i*j.

Original entry on oeis.org

1, 2, 54, 1377, 55350, 4164534, 217595322, 11974135554, 999599777190, 150051627647010, 11873389098337236
Offset: 0

Views

Author

Stefano Spezia, Sep 27 2022

Keywords

Examples

			a(3) = 1377:
    1, 2, 3, 4, 5, 6;
    2, 4, 6, 8, 1, 3;
    3, 6, 9, 3, 6, 9;
    4, 8, 3, 7, 2, 6;
    5, 1, 6, 2, 7, 3;
    6, 3, 9, 6, 3, 9.
		

Crossrefs

Cf. A003991, A010888, A353109, A353933 (permanent of M(n)), A353974 (trace of M(n)).

Programs

  • Mathematica
    M[i_, j_, n_] := If[i*j == 0, 0, 1 + Mod[i*j - 1, 9]]; a[n_] := Sum[Product[M[Part[PermutationList[s, 2 n], 2 i - 1], Part[PermutationList[s, 2 n], 2 i], 2 n], {i, n}], {s, SymmetricGroup[2 n] // GroupElements}]/(n!*2^n); Array[a, 6, 0]

Extensions

a(6)-a(10) from Pontus von Brömssen, Oct 15 2023
Showing 1-9 of 9 results.