A118815
Determinants of 5 X 5 matrices consisting of 25 consecutive primes.
Original entry on oeis.org
-4656, 1440, 2912, 2832, -10464, -768, -17376, 20384, -72976, -18944, 12672, 41184, -199776, 28944, -21104, 3552, 25488, 338448, -60192, 39952, -21792, -161904, 499488, -83424, -7440, 7440, -54288, -75456, 1641792, 42288
Offset: 1
a(1) = -4656 =
| 2 3 5 7 11|
|13 17 19 23 29|
|31 37 41 43 47|
|53 59 61 67 71|
|73 79 83 89 97|.
-
a(n) = matdet(matrix(5,5,i,j,prime((n+j-1)+5*(i-1)))); \\ Michel Marcus, Jan 25 2021
A316558
Discriminant of characteristic polynomial of n X n matrix containing the first n^2 primes in increasing order.
Original entry on oeis.org
1, 85, 17467988, 2652709797555700, -31887567679999704368444416, -19545503919145188068282045605299993931776, 4067279303127129300135103866787550140697786459885666304000, 34322785008286059488919151392862698816528603867951539153613244229443277820002304000
Offset: 1
-
f:= n -> discrim(LinearAlgebra:-CharacteristicPolynomial(Matrix(n,n,[seq(ithprime(i),i=1..n^2)]),t),t):
map(f, [$1..20]);
-
a(n) = my(k = 0, m = matrix(n, n, x, y, prime(k=k+1))); poldisc(charpoly(m)); \\ Michel Marcus, Jul 07 2018
A319012
a(n) = Sum_{i=1..n} prime(n*(i - 1) + i).
Original entry on oeis.org
2, 9, 36, 99, 224, 407, 724, 1129, 1700, 2451, 3382, 4543, 5986, 7661, 9724, 12041, 14762, 17891, 21482, 25499, 29998, 35083, 40644, 46873, 53620, 61077, 69240, 78119, 87686, 98053, 109290, 121503, 134388, 148297, 162970, 178905, 195770, 213725, 232794
Offset: 1
For n = 1 the matrix M(1) is
2
with trace Tr(M(1)) = a(1) = 2.
For n = 2 the matrix M(2) is
2, 3
5, 7
with Tr(M(2)) = a(2) = 9.
For n = 3 the matrix M(3) is
2, 3, 5
7, 11, 13
17, 19, 23
with Tr(M(3)) = a(3) = 36.
-
a:=n->add(ithprime(n*(i-1)+i),i=1..n): seq(a(n),n=1..40); # Muniru A Asiru, Sep 17 2018
-
Table[Tr[Partition[Array[Prime, n^2], n]], {n, 40}]
-
a(n) = sum(i=1, n, prime(n*(i - 1) + i)); \\ Michel Marcus, Sep 07 2018
A321685
Determinant of n X n matrix containing the first n^2 composites in increasing order.
Original entry on oeis.org
4, -12, 24, 0, -51, 0, 262, -126, 0, -1684, -47, 0, 480, 0, -854, 4349, 0, -2690, 10595, 0, 9074, 9680, 37734, -48262, 1200, -98037, 415504, -1687656, -1840201, 2208435, -24907680, -20571545, -2873052, 23511040, 255110496, 98995966, -17722962796, 3495484872
Offset: 1
For n = 3: The matrix consisting of the initial 3^2 = 9 composites is
--- ---
| 4 6 8 |
| 9 10 12 |
| 14 15 16 |
--- ---
The determinant of the matrix is 24, so a(3) = 24.
-
composite[n_] := FixedPoint[n + PrimePi[#] + 1 &, n + PrimePi[n] + 1]; a[n_] := Det[ArrayReshape[Array[composite, n^2], {n, n}]]; Array[a, 40] (* Amiram Eldar, Nov 17 2018 after Robert G. Wilson v at A002808 *)
Module[{nn=40,cmps},cmps=Select[Range[2nn^2],CompositeQ];Table[Det[ Partition[ Take[cmps,n^2],n]],{n,nn}]] (* Harvey P. Dale, Aug 10 2021 *)
-
composite(n) = my(i=0); forcomposite(c=1, , i++; if(i==n, return(c)))
compositepi(n) = my(i=0); if(n==4, return(1), forcomposite(c=1, n, i++)); i
compositesquare(n) = if(n==1, return(Mat([4]))); my(s=""); forcomposite(c=1, composite(n^2), s=concat(s, Str(c)); if(compositepi(c)%n==0 && c!=composite(n^2), s=concat(s, "; "), if(c!=composite(n^2), s=concat(s, ", ")))); s=concat("[", s); s=concat(s, "]")
a(n) = matdet(eval(compositesquare(n)))
-
a(n) = my (m=matrix(n,n), r=1, c=1); forcomposite(k=1,, m[r,c] = k; r++; if (r>n, r=1; c++; if (c>n, return (matdet(m))))) \\ Rémy Sigrist, Nov 17 2018
-
from sympy import Array, Matrix, composite
def A321685(n):
return Matrix(Array((composite(i) for i in range(1,n**2+1)),(n,n))).det() # Chai Wah Wu, Sep 08 2020
Comments