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

A374067 a(n) is the permanent of the symmetric Toeplitz matrix of order n whose element (i,j) equals the |i-j|-th prime or 1 if i = j.

Original entry on oeis.org

1, 1, 5, 42, 753, 22969, 1226225, 98413280, 11551199289, 1828335971613, 379823112871605, 102232301626742202, 34359550765856135217, 14289766516805617273497, 7224166042347461997365713, 4334493536305030883929928032, 3046742350470292308074313518937, 2492781304663024301187012794633153
Offset: 0

Views

Author

Stefano Spezia, Jun 27 2024

Keywords

Comments

Conjecture: a(n) is the minimal permanent of an n X n symmetric Toeplitz matrix having 1 on the main diagonal and all the first n-1 primes off-diagonal. - Stefano Spezia, Jul 08 2024

Examples

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

Crossrefs

Cf. A071078 (determinant), A306457, A318173.

Programs

  • Mathematica
    a[n_]:=Permanent[Table[ If[i == j, 1, Prime[Abs[i - j]]], {i, 1, n}, {j, 1, n}]]; Join[{1},Array[a, 17]]
  • PARI
    a(n) = matpermanent(matrix(n, n, i, j, if (i==j, 1, prime(abs(i-j))))); \\ Michel Marcus, Jun 27 2024

A374068 a(n) is the permanent of the symmetric Toeplitz matrix of order n whose element (i,j) equals the |i-j|-th prime or 0 if i = j.

Original entry on oeis.org

1, 0, 4, 24, 529, 16100, 919037, 75568846, 9196890092, 1491628025318, 317579623173729, 86997150829931700, 29703399282858184713, 12512837775355494800500, 6397110844644502402189404, 3875565057688532269985283868, 2747710211567246171588232074225, 2265312860218073375019946448731300
Offset: 0

Views

Author

Stefano Spezia, Jun 27 2024

Keywords

Comments

Conjecture: a(n) is the minimal permanent of an n X n symmetric Toeplitz matrix having 0 on the main diagonal and all the first n-1 primes off-diagonal. - Stefano Spezia, Jul 06 2024

Examples

			a(4) = 529:
  [0, 2, 3, 5]
  [2, 0, 2, 3]
  [3, 2, 0, 2]
  [5, 3, 2, 0]
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=Permanent[Table[If[i == j, 0, Prime[Abs[i - j]]], {i, 1, n}, {j, 1, n}]]; Join[{1},Array[a, 17]]
  • PARI
    a(n) = matpermanent(matrix(n, n, i, j, if (i==j, 0, prime(abs(i-j))))); \\ Michel Marcus, Jun 28 2024

A374070 a(n) is the permanent of the symmetric Toeplitz matrix of order n whose element (i,j) equals the |i-j|-th composite or 0 if i = j.

Original entry on oeis.org

1, 0, 16, 192, 7056, 296928, 17353552, 1288517448, 123247560033, 14559205069230, 2068503986414344, 350413573991639400, 70216794936245622096, 16348540980271313405736, 4358673413318637872138056, 1324443244518891911978887758, 453726273130387432163560157389, 173630294056619179637594095141048
Offset: 0

Views

Author

Stefano Spezia, Jun 27 2024

Keywords

Examples

			a(4) = 7056:
  [0, 4, 6, 8]
  [4, 0, 4, 6]
  [6, 4, 0, 4]
  [8, 6, 4, 0]
		

Crossrefs

Cf. A071081 (determinant).

Programs

  • Mathematica
    Composite[n_Integer]:=FixedPoint[n + PrimePi[#] + 1 &, n + PrimePi[n] + 1]; a[n_]:=Permanent[Table[If[i == j, 0, Composite[Abs[i - j]]], {i, 1, n}, {j, 1, n}]]; Join[{1},Array[a,17]]
  • PARI
    a(n) = my(composite(n)=my(k=-1); while(-n+n+=-k+k=primepi(n), ); n); matpermanent(matrix(n, n, i, j, if(i==j, 0, composite(abs(i-j))))); \\ Ruud H.G. van Tol, Jul 14 2024
  • Python
    from sympy import Matrix, composite
    def A374070(n): return Matrix(n,n,[composite(abs(j-k)) if j!=k else 0 for j in range(n) for k in range(n)]).per() if n else 1 # Chai Wah Wu, Jul 01 2024
    

A374071 a(n) is the permanent of the Toeplitz matrix of order n whose element (i,j) equals the (i-j)-th composite number if i > j, (j-i)-th prime number if i < j, or 1 if i = j.

Original entry on oeis.org

1, 1, 9, 107, 2609, 98089, 5564610, 438180102, 46399705928, 6279673881161, 1060663766284535, 222840745939132105, 56798048066468972011, 17364018690978269373950, 6261448805827102522607660, 2624315396531837995006160020, 1263427401352418949898456181999, 693487403043958170112254851399169
Offset: 0

Views

Author

Stefano Spezia, Jun 27 2024

Keywords

Examples

			a(4) = 2609:
  [1, 2, 3, 5]
  [4, 1, 2, 3]
  [6, 4, 1, 2]
  [8, 6, 4, 1]
		

Crossrefs

Cf. A071082 (determinant).

Programs

  • Maple
    P,C:= selectremove(isprime,[$2..100]):
    f:= proc(n) local i; uses LinearAlgebra;
      Permanent(ToeplitzMatrix([seq(C[i],i=n-1..1,-1),1,seq(P[i],i=1..n-1)]))
    end proc:
    map(f, [$0..20]); # Robert Israel, Jun 27 2024
  • Mathematica
    Composite[n_Integer] := FixedPoint[n + PrimePi[ # ] + 1 &, n + PrimePi[n] + 1]; a[n_]:= Permanent[Table[If[i == j, 1, If[i > j, Composite[i - j], Prime[j - i]]], {i, 1, n}, {j, 1, n}]]; Join[{1},Array[a, 17]]

A071080 Determinant of the n X n matrix whose element (i,j) equals the |i-j|-th composite number, or 1 if i=j.

Original entry on oeis.org

1, -15, 125, -935, 6096, -38340, 240864, -1497584, 8611328, -49201152, 277473280, -1541996288, 7852493824, -39972516864, 195624648704, -789661486080, 3052709008384, -9659706075392, 30089357409792, -63825905935360, 63965499203712, -8296932715920, -1139418909751008
Offset: 1

Views

Author

Robert G. Wilson v, May 26 2002

Keywords

Crossrefs

Cf. A374069 (permanent).

Programs

  • Maple
    comps:= remove(isprime,[$4 .. 1000]):
    f:= proc(n) local M;
      M:= Matrix(n,n,(i,j) -> `if`(i=j,1,comps[abs(i-j)]));
      LinearAlgebra:-Determinant(M)
    end proc:
    map(f, [$1..25]); # Robert Israel, Dec 03 2024
  • Mathematica
    Composite[n_Integer] := FixedPoint[n + PrimePi[ # ] + 1 &, n + PrimePi[n] + 1]; f[n_] := Det[ Table[ If[i == j, 1, Composite[ Abs[i - j]]], {i, 1, n}, {j, 1, n}]]; Table[ f[n], {n, 1, 20}]

Extensions

a(21)-a(23) from Stefano Spezia, Jun 27 2024
Showing 1-5 of 5 results.