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

A318173 The determinant of an n X n Toeplitz matrix M(n) whose first row consists of successive prime numbers prime(1), ..., prime(n) and whose first column consists of prime(1), prime(n + 1), ..., prime(2*n - 1).

Original entry on oeis.org

2, -11, 158, -6513, 202790, -12710761, 578257422, -45608219247, 8774909485920, -579515898830751, 115918088707226940, -16737522590543449641, 1282860173728469083872, -189053227741259934603831, 55171097827950314187327460, -16235234399834578732807710581
Offset: 1

Views

Author

Stefano Spezia, Aug 20 2018

Keywords

Comments

The trace of the matrix M(n) is A005843(n).
The sum of the first row of the matrix M(n) is A007504(n).
The permanent of the matrix M(n) is A306457(n).
For n > 1, the subdiagonal sum of the matrix M(n) is A306192(n).

Examples

			For n = 1 the matrix M(1) is
   2
with determinant Det(M(1)) = 2.
For n = 2 the matrix M(2) is
   2, 3
   5, 2
with Det(M(2)) = -11.
For n = 3 the matrix M(3) is
   2, 3, 5
   7, 2, 3
  11, 7, 2
with Det(M(3)) = 158.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) uses LinearAlgebra;
    Determinant(ToeplitzMatrix([seq(ithprime(i),i=2*n-1..n+1,-1),seq(ithprime(i),i=1..n)]))
    end proc:
    map(f, [$1..20]); # Robert Israel, Aug 30 2018
  • Mathematica
    p[i_]:=Prime[i]; a[n_]:=Det[ToeplitzMatrix[Join[{p[1]},Array[p,n-1,{n+1,2*n-1}]],Array[p,n]]]; Array[a,20]
  • PARI
    tm(n) = {my(m = matrix(n, n, i, j, if (i==1, prime(j), if (j==1, prime(n+i-1))))); for (i=2, n, for (j=2, n, m[i,j] = m[i-1, j-1];);); m;}
    a(n) = matdet(tm(n)); \\ Michel Marcus, Mar 17 2019

A306457 The permanent of an n X n Toeplitz matrix M(n) whose first row consists of successive prime numbers prime(1), ..., prime(n) and whose first column consists of prime(1), prime(n + 1), ..., prime(2*n - 1).

Original entry on oeis.org

1, 2, 19, 546, 40851, 4747510, 986799301, 292666754602, 135134321711681, 80312872924339660, 55242523096584443271, 52058868505260739019880, 55579419798019716586180451, 72402676504369062268839297084, 120521257466525185305708420453019, 234000358527930078723939842673115488
Offset: 0

Views

Author

Stefano Spezia, Feb 17 2019

Keywords

Comments

The trace of the matrix M(n) is A005843(n).
The sum of the first row of the matrix M(n) is A007504(n).
The determinant of the matrix M(n) is A318173(n).
For n > 1, the subdiagonal sum of the matrix M(n) is A306192(n).

Examples

			For n = 1 the matrix M(1) is
    2
with permanent a(1) = 2.
For n = 2 the matrix M(2) is
    2, 3
    5, 2
with permanent a(2) = 19.
For n = 3 the matrix M(3) is
    2, 3, 5
    7, 2, 3
   11, 7, 2
with permanent a(3) = 546.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) uses LinearAlgebra; `if`(n=0, 1, Permanent(ToeplitzMatrix([seq(ithprime(i), i=2*n-1..n+1, -1), seq(ithprime(i), i=1..n)]))) end proc: map(f, [$0..15]);
  • Mathematica
    p[i_]:=Prime[i];a[n_]:=If[n==0,1,Permanent[ToeplitzMatrix[Join[{p[1]},Array[p,n-1,{n+1,2*n-1}]],Array[p,n]]]];Array[a,15,0]
  • PARI
    tm(n) = {my(m = matrix(n, n, i, j, if (i==1, prime(j), if (j==1, prime(n+i-1))))); for (i=2, n, for (j=2, n, m[i,j] = m[i-1, j-1];);); m;}
    a(n) = matpermanent(tm(n)); \\ Michel Marcus, Mar 16 2019

Extensions

a(0) = 1 prepended by Stefano Spezia, Dec 06 2019

A340781 a(n) = (n - 1)*prime(n + 1) mod prime(n).

Original entry on oeis.org

0, 2, 4, 5, 8, 7, 12, 9, 2, 18, 29, 7, 24, 9, 37, 37, 32, 41, 5, 38, 47, 5, 49, 6, 96, 50, 1, 54, 3, 67, 120, 55, 64, 52, 68, 59, 59, 148, 61, 61, 80, 48, 84, 172, 88, 142, 130, 188, 96, 196, 67, 102, 38, 67, 67, 67, 112, 71, 232, 118, 34, 268, 248, 126, 256, 276
Offset: 1

Views

Author

Stefano Spezia, Jan 21 2021

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Mod[(n-1)Prime[n+1],Prime[n]],{n,66}]
  • PARI
    a(n) = ((n-1)*prime(n+1)) % prime(n); \\ Michel Marcus, Jan 21 2021

Formula

a(n) = A306192(n) mod A000040(n).
Showing 1-3 of 3 results.