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

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

Original entry on oeis.org

1, 1, -3, 8, -21, 45, -81, -504, -327, -95, -27, 3744, -514125, 42577129, -594343521, 6384803528, 55828902985, 222653960625, -24898185972135, 370012327363008, -5108693773098321, 66203904684406485, -696661740301346521, 5010137735370840432, -22341106332701627463
Offset: 0

Views

Author

Robert G. Wilson v, May 26 2002

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_] := Det[ Table[ If[ i == j, 1, Prime[ Abs[i - j]]], {i, 1, n}, {j, 1, n}]]; Table[ f[n], {n, 1, 21}]

Extensions

More terms from Sean A. Irvine, Jun 27 2024
a(0)=1 prepended by Alois P. Heinz, Jun 27 2024

A071079 Determinant of the n X n matrix whose element (i,j) equals the |i-j|-th prime or if i=j, 0.

Original entry on oeis.org

1, 0, -4, 24, -135, 696, -3577, 8738, -21120, 7182, 85995, 307692, -4739379, 72588316, 1042545852, 13023653868, -40433805531, -160245671048, 2415459163787, 80057252715814, -4733090488738644, 277504161503477090, -7200884073495803561, 97750528494490914120
Offset: 0

Views

Author

Robert G. Wilson v, May 26 2002

Keywords

Crossrefs

Programs

  • Maple
    a:= n-> LinearAlgebra[Determinant](Matrix(n,
       (i, j)-> `if`(i=j, 0, ithprime(abs(i-j))))):
    seq(a(n), n=0..24);  # Alois P. Heinz, Jun 27 2024
  • Mathematica
    f[n_] := Det[ Table[ If[ i == j, 0, Prime[ Abs[i - j]]], {i, 1, n}, {j, 1, n}]]; Table[ f[n], {n, 1, 20}]

Extensions

More terms from Sean A. Irvine, Jun 27 2024
a(0)=1 prepended by Alois P. Heinz, Jun 27 2024

A071083 Determinant of the n X n matrix whose element (i,j) equals phi(|i-j|).

Original entry on oeis.org

0, -1, 2, -4, 6, -5, -84, 245, 924, -8816, -78556, -58667, 6779732, 10484275, -363899598, -6434306752, -13046891490, 20608641823, 1894093427008, -6177545952015, 18227184915788, -46023445768832, -8765268354146700, -1210879926442292743, -149657142827643535248
Offset: 1

Views

Author

Robert G. Wilson v, May 26 2002

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_] := Det[ Table[ EulerPhi[ Abs[i - j]], {i, 1, n}, {j, 1, n}]]; Table[ f[n], {n, 1, 22}]

Extensions

More terms from Sean A. Irvine, Jun 27 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

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

Original entry on oeis.org

1, 0, -16, 192, -1904, 16416, -134608, 1102920, -8971103, 69262338, -527129920, 4002967800, -30263030000, 218133853800, -1565386817920, 11130108480678, -75244171093875, 496516351214832, -3261752198331472, 21401161780748720, -140093238345715827, 914525302322457472
Offset: 0

Views

Author

Robert G. Wilson v, May 26 2002

Keywords

Crossrefs

Cf. A374070 (permanent).

Programs

  • Maple
    comps:= remove(isprime,[$4 .. 11000]):
    f:= proc(n) local M;
      M:= Matrix(n,n,(i,j) -> `if`(i=j,0,comps[abs(i-j)]));
      LinearAlgebra:-Determinant(M)
    end proc:
    f(0):= 1:
    map(f, [$0..25]); # Robert Israel, Dec 02 2024
  • Mathematica
    Composite[n_Integer] := FixedPoint[n + PrimePi[ # ] + 1 &, n + PrimePi[n] + 1]; f[n_] := Det[ Table[ If[i == j, 0, Composite[ Abs[i - j]]], {i, 1, n}, {j, 1, n}]]; Table[ f[n], {n, 1, 20}]
  • PARI
    a(n) = my(composite(n)=my(k=-1); while(-n+n+=-k+k=primepi(n), ); n); matdet(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 A071081(n): return Matrix(n,n,[composite(abs(j-k)) if j!=k else 0 for j in range(n) for k in range(n)]).det() # Chai Wah Wu, Jul 01 2024
    

Extensions

a(21) from Stefano Spezia, Jun 27 2024
a(0)=1 prepended by Alois P. Heinz, Jul 01 2024
Showing 1-6 of 6 results.