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.

A067276 Determinant of n X n matrix containing the first n^2 primes in increasing order.

Original entry on oeis.org

2, -1, -78, 880, -4656, -14304, -423936, 8342720, 711956736, -615707136, 21057138688, -4663930678272, 211912980656128, -9178450735677440, 40005919124799488, 83013253447139328, -8525111273818357760, -800258888289188708352, -15170733077495639179264
Offset: 1

Views

Author

Rick L. Shepherd, Feb 21 2002

Keywords

Comments

The first column contains the first n primes in increasing order, the second column contains the next n primes in increasing order, etc. Equivalently, first row contains first n primes in increasing order, second row contains next n primes in increasing order, etc. Sequences of determinants of matrices specifically containing primes include A024356 (Hankel matrix), A067549 (first n primes on diagonal, other elements 1), A066933 (cyclic permutations of first n primes in each row) and A067551 (first n primes on diagonal, other elements 0).

Examples

			a(3) = -78 because det[[2,7,17],[3,11,19],[5,13,23]] = -78 (= det[[2,3,5],[7,11,13],[17,19,23]], the determinant of the transpose.).
		

Crossrefs

Programs

  • Magma
    [ Determinant( Matrix(n, n, [ NthPrime(k): k in [1..n^2] ]) ): n in [1..19] ]; // Klaus Brockhaus, May 12 2010
    
  • Maple
    seq(LinearAlgebra:-Determinant(Matrix(n,n,(i,j) -> ithprime(n*(i-1)+j))),n=1..20); # Robert Israel, Jul 12 2017
  • Mathematica
    Table[ Det[ Partition[ Array[Prime, n^2], n]], {n, 19}] (* Robert G. Wilson v, May 26 2006 *)
  • PARI
    for(n=1,20,k=0; m=matrix(n,n,x,y, prime(k=k+1)); print1(matdet(m), ", ")) /* The matrix initialization command above fills columns first: Variables (such as) x and y take on values 1 through n for rows and columns, respectively, with x changing more rapidly and they must be specified even though the 5th argument is not an explicit function of them here. */
    
  • Python
    from sympy.matrices import Matrix
    from sympy import sieve
    def a(n):
        sieve.extend_to_no(n**2)
        return Matrix(n, n, sieve[1:n**2+1]).det()
    print([a(n) for n in range(1, 20)]) # Indranil Ghosh, Jul 31 2017

A118770 Determinant of n X n matrix containing the first n^2 semiprimes in increasing order.

Original entry on oeis.org

4, -14, -196, 480, 696, -57901, -525364, -409579, 18528507, -237549252, -2119519900, 6713972874, 18262155072, -19072020914992, 162234208372185, 1471912942112734, 6828673030820538, -35126752028893500, 729026655790306778, -15365360727898374618
Offset: 1

Views

Author

Jonathan Vos Post, May 22 2006

Keywords

Comments

Semiprime analog of A067276 Determinant of n X n matrix containing the first n^2 primes in increasing order. The first column contains the first n semiprimes in increasing order, the second column contains the next n semiprimes in increasing order, etc. Equivalently, first row contains first n semiprimes in increasing order, second row contains next n semiprimes in increasing order, etc. See also: A118713 a(n) = determinant of n X n circulant matrix whose first row is A001358(1), A001358(2), ..., A001358(n) where A001358(n) = n-th semiprime.

Examples

			a(2) = -14 because of the determinant -14 =
|4,6 |
|9,10|.
a(6) = -57901 = the determinant
|4, 6, 9, 10, 14, 15,|
|21, 22, 25, 26, 33, 34,|
|35, 38, 39, 46, 49, 51,|
|55, 57, 58, 62, 65, 69,|
|74, 77, 82, 85, 86, 87,|
|91, 93, 94, 95, 106, 111|.
		

Crossrefs

Programs

  • Mathematica
    SemiPrimePi[ n_ ] := Sum[ PrimePi[ n/Prime @ i ] - i + 1, {i, PrimePi @ Sqrt @ n} ]; SemiPrime[ n_ ] := Block[ {e = Floor[ Log[ 2, n ] + 1 ], a, b}, a = 2^e; Do[ b = 2^p; While[ SemiPrimePi[ a ] < n, a = a + b ]; a = a - b/2, {p, e, 0, -1} ]; a + b/2 ]; Table[ Det[ Partition[ Array[ SemiPrime, n^2 ], n ] ], {n, 20} ] (* Robert G. Wilson v, May 26 2006 *)
    Module[{nn=5000,spr},spr=Select[Range[nn],PrimeOmega[#]==2&];Table[Det[ Partition[ Take[spr,n^2],n]],{n,Sqrt[Length[spr]]}]] (* Harvey P. Dale, Nov 21 2018 *)

Extensions

More terms from Robert G. Wilson v, May 26 2006
Typos in Mma program corrected by Giovanni Resta, Jun 12 2016

A118779 Determinant of n X n matrix containing the first n^2 4-almost primes in increasing order.

Original entry on oeis.org

16, -224, 0, 182016, 12734992, -80430368, -125120640, 1334967760, 1060202222660, -2759409121760, 54820105989504, -14148083510835712, 49989643415528010, 299304923505836144, 1713123391839442498, 93227182153040103540, -86403659709730762670
Offset: 1

Views

Author

Jonathan Vos Post, May 22 2006

Keywords

Comments

4-almost prime analog of A067276 Determinant of n X n matrix containing the first n^2 primes in increasing order. The first column contains the first n 4-almost primes (A014613) in increasing order, the second column contains the next n 4-almost primes in increasing order, etc. Equivalently, first row contains first n 4-almost primes in increasing order, second row contains next n 4-almost primes in increasing order, etc. See also: A118713 a(n) = semiprime circulant.

Examples

			a(2) = -224 because of the determinant -224 =
|16, 24|
|36, 40|.
a(3) = 0 because this matrix is singular: 0 =
|16, 24, 36|
|40, 54, 56|
|60, 81, 84|.
a(6) = -80430368 because of the determinant -80430368 =
| 16, 24, 36, 40, 54, 56|
| 60, 81, 84, 88, 90, 100|
| 104, 126, 132, 135, 136, 140|
| 150, 152, 156, 184, 189, 196|
| 198, 204, 210, 220, 225, 228|
| 232, 234, 248, 250, 260, 276|.
a(8) = 1334967760 =
| 16, 24, 36, 40, 54, 56, 60, 81|
| 84, 88, 90, 100, 104, 126, 132, 135|
|136, 140, 150, 152, 156, 184, 189, 196|
|198, 204, 210, 220, 225, 228, 232, 234|
|248, 250, 260, 276, 294, 296, 297, 306|
|308, 315, 328, 330, 340, 342, 344, 348|
|350, 351, 364, 372, 375, 376, 380, 390|
|414, 424, 441, 444, 459, 460, 462, 472|.
		

Crossrefs

Programs

  • Mathematica
    FourAlmostPrimePi[n_] := Sum[PrimePi[n/(Prime@i*Prime@j*Prime@k)] - k + 1, {i, PrimePi[n^(1/4)]}, {j, i, PrimePi[(n/Prime@i)^(1/3)]}, {k, j, PrimePi@Sqrt[n/(Prime@i*Prime@j)]}]; FourAlmostPrime[n_] := Block[{e = Floor[Log[2, n] + 1], a, b}, a = 2^e; Do[b = 2^p; While[FourAlmostPrimePi[a] < n, a = a + b]; a = a - b/2, {p, e, 0, -1}]; a + b/2]; Table[Det[Partition[Array[FourAlmostPrime, n^2], n]], {n, 17}] (* Robert G. Wilson v, May 26 2006 *)

Extensions

More terms from Robert G. Wilson v, May 26 2006
Showing 1-3 of 3 results.