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.

A381514 a(n) is the hafnian of a symmetric Toeplitz matrix of order 2*n whose off-diagonal element (i,j) equals the |i-j|-th prime.

Original entry on oeis.org

1, 2, 23, 899, 85072, 15120411, 4439935299, 1989537541918, 1264044973158281, 1090056235155152713, 1227540523199054294506
Offset: 0

Views

Author

Stefano Spezia, Feb 25 2025

Keywords

Examples

			a(2) = 23 because the hafnian of
  [d  2  3  5]
  [2  d  2  3]
  [3  2  d  2]
  [5  3  2  d]
equals M_{1,2}*M_{3,4} + M_{1,3}*M_{2,4} + M_{1,4}*M_{2,3} = 2*2 + 3*3 + 5*2 = 23. Here d denotes the generic element on the main diagonal of the matrix from which the hafnian does not depend.
		

Crossrefs

Programs

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

Extensions

a(5)-a(10) from Pontus von Brömssen, Feb 26 2025