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.

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]]