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-10 of 11 results. Next

A069191 Determinant of n X n matrix defined by m(i,j)=1 if i+j is a prime, m(i,j)=0 otherwise.

Original entry on oeis.org

1, -1, -1, 0, 1, -1, -4, 4, 0, 0, 0, 0, 0, 0, 0, 4, 4, -9, -25, 121, 64, -576, -2304, 3600, 3136, -256, -144, 961, 24025, -47089, -345744, 1317904, 107584, -26896, -30976, 17424, 30976, -156025, -76729, 485809, 478864, -36481, -837225, 5776, 517198564, -15791440896, -16404230241, 45746793225
Offset: 1

Views

Author

Santi Spadaro, Apr 19 2002

Keywords

Comments

Abs(a(n)) is always a perfect square.
A general result for Hankel determinants: Given any sequence a(0),a(1),... of numbers, let the n X n Hankel matrix A[i,j]=x if i=j=0, 0 if i+j even and a(((i+j)-1)/2) otherwise where 0<=i,jMichael Somos
Conjecture: Let M(n) be the n X n matrix with (i,j)-entry equal to 1 or 0 according as i + j is prime or not. For each n = 24, 25, ..., the characteristic polynomial of M(n) is irreducible over the field of rational numbers, and the n eigenvalues can be listed as lambda(1), ..., lambda(n) such that lambda(1) > -lambda(2) > lambda(3) > -lambda(4) > .... > (-1)^n*lambda(n) > 0. - Zhi-Wei Sun, Aug 25 2013
That (-1)^(n(n-1)/2)*a(n) is a perfect square is a special case of a general theorem mentioned in A228591. - Zhi-Wei Sun, Aug 25 2013

Crossrefs

Cf. A073364.

Programs

  • Mathematica
    f[n_] := Det[ Table[ If[ PrimeQ[i + j], 1, 0], {i, 1, n}, {j, 1, n}]]; Table[ f[n], {n, 1, 45}]

A228615 Determinant of the n X n matrix with (i,j)-entry equal to 1 or 0 according as 2*(i + j) - 1 and 2*(i + j) + 1 are twin primes or not.

Original entry on oeis.org

1, -1, -1, -1, 0, 0, -1, 1, 1, 1, -1, 0, 0, 0, -1, -1, 1, 1, 1, -1, 2, 8, -18, -9, -1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, -4096, -4096, 64, -20, -125, 5, -6, -216, 24, 152, 54872, -106742, 14045, 125, -21125, -274625, -274625, 10985, -16731, -970299, 1804275, 1312200, 373248, -691488, -192080
Offset: 1

Views

Author

Zhi-Wei Sun, Aug 27 2013

Keywords

Comments

Conjecture: a(n) is nonzero for any n > 35.
Clearly this conjecture implies the twin prime conjecture.

Examples

			a(1) = 1 since 2*(1 + 1) - 1 = 3 and 2*(1 + 1) + 1 = 5 are twin primes.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=a[n]=Det[Table[If[PrimeQ[2(i+j)-1]&&PrimeQ[2(i+j)+1],1,0],{i,1,n},{j,1,n}]]
    Table[a[n],{n,1,20}]
    Table[Det[Table[If[AllTrue[2(i+j)+{1,-1},PrimeQ],1,0],{i,k},{j,k}]],{k,60}] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Sep 21 2019 *)

A228552 Square root of the absolute value of A069191(n).

Original entry on oeis.org

1, 1, 1, 0, 1, 1, 2, 2, 0, 0, 0, 0, 0, 0, 0, 2, 2, 3, 5, 11, 8, 24, 48, 60, 56, 16, 12, 31, 155, 217, 588, 1148, 328, 164, 176, 132, 176, 395, 277, 697, 692, 191, 915, 76, 22742, 125664, 128079, 213885, 7371, 171654, 89678, 114902, 149465, 353497, 144573, 388325, 198676, 1738118, 1311164, 222898
Offset: 1

Views

Author

Zhi-Wei Sun, Aug 25 2013

Keywords

Comments

According to the comments of A069191, a(n) should be always integral. Note that a(2*n) is the absolute value of A228616(n) by the comments of A228591. We conjecture that a(n) > 0 for all n > 15.

Crossrefs

Programs

  • Mathematica
    a[n_]:=a[n]=Sqrt[Abs[Det[Table[If[PrimeQ[i+j]==True,1,0],{i,1,n},{j,1,n}]]]]
    Table[a[n],{n,1,20}]

A228557 Determinant of the n X n matrix with (i,j)-entry equal to 1 or 0 according as i + j and i + j + 2 are twin primes or not.

Original entry on oeis.org

0, -1, 0, 1, 0, -1, 0, 1, 0, 0, 0, 0, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 0, 0, 0, 0, 0, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -4, 0, 64, 0, -324, 0, 81, 0, -1, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Zhi-Wei Sun, Aug 25 2013

Keywords

Comments

Clearly p is odd if p and p + 2 are twin primes. If sigma is a permutation of {1,...,n}, and i + sigma (i) and i + sigma(i) + 2 are twin primes for all i = 1,...,n, then we must have sum_{i=1}^n (i + sigma(i)) == n (mod 2) and hence n is even. Therefore a(n) = 0 if n is odd.
By the general result mentioned in A228591, (-1)^n*a(2*n) equals the square of A228615(n).
Zhi-Wei Sun made the following general conjecture:
Let d be any positive even integer, and let D(d,n) be the n X n determinant with (i,j)-entry eual to 1 or 0 according as i + j and i + j + d are both prime or not. Then D(d,2*n) is nonzero for large n.
Note that when n is odd we have D(d,n) = 0 (just like a(n) = 0). Also, the conjecture implies de Polignac's conjecture that there are infinitely many primes p such that p and p + d are both prime.

Examples

			a(1) = 0 since {2, 4} is not a twin prime pair.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=a[n]=Det[Table[If[PrimeQ[i+j]==True&&PrimeQ[i+j+2]==True,1,0],{i,1,n},{j,1,n}]]
    Table[a[n],{n,1,100}]

A228616 Determinant of the n X n matrix with (i,j)-entry equal to 1 or 0 according as 2*(i + j) - 1 is prime or not.

Original entry on oeis.org

1, 0, -1, -2, 0, 0, 0, -2, 3, 11, 24, -60, -16, 31, -217, -1148, -164, 132, 395, 697, -191, -76, 125664, -213885, -171654, 114902, 353497, -388325, -1738118, -222898, 248633, 382075, -1637075, 21100, 4049068, -189147708, -279083383, 472023163, -19063401, -6718578823
Offset: 1

Views

Author

Zhi-Wei Sun, Aug 27 2013

Keywords

Comments

Conjecture: a(n) is nonzero for any n > 7.
Clearly this conjecture implies that there are infinitely many primes.

Examples

			 a(1) = 1 since 2*(1 + 1) - 1 = 3 is a prime.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=a[n]=Det[Table[If[PrimeQ[2(i+j)-1],1,0],{i,1,n},{j,1,n}]]
    Table[a[n],{n,1,40}]

A228559 Determinant of the n X n matrix with (i,j)-entry equal to 1 or 0 according as i + j is a Sophie Germain prime or not.

Original entry on oeis.org

1, -1, -1, 1, 0, -1, -1, 1, 1, -1, 0, 1, 1, -1, -4, 16, 0, -64, -64, 64, 0, 0, 0, 0, 0, -64, -64, 64, 0, -16, -4, 1, 1, -1, 0, 4, 16, -64, -144, 324, 0, -81, -9, 1, 4, -16, 0, 64, 64, -64, 0, 0, 0, 0, 0, 262144, 4194304, -67108864, 0, 1073741824
Offset: 1

Views

Author

Zhi-Wei Sun, Aug 25 2013

Keywords

Comments

If p > 3 and 2*p+1 are both prime, then p == -1 (mod 6). If tau is a permutation of {1,...,n}, and i + tau(i) is a Sophie Germain prime for each i = 1,...,n, then n*(n+1) = sum_{i=1}^n (i + tau(i)) is congruent to -n or 2 - (n - 1) or 3 - (n - 1) or 3 + 3 - (n - 2) modulo 6, which is impossible when n == -1 (mod 6). Therefore a(6*n-1) = 0 for all n > 0.
Note also that (-1)^{n*(n-1)/2}*a(n) is always a square in view of the comments in A228591.
Conjecture: a(n) is nonzero if n is greater than 55 and not congruent to 5 modulo 6.
Zhi-Wei Sun also had some similar conjectures. For example, if b(n) denotes the n X n determinant with (i,j)-entry equal to 1 or 0 according as i + j and 2*(i + j) - 1 are both prime or not, then b(n) is nonzero when n is greater than 125 and not congruent to 3 modulo 6. (Just like a(6*n-1) = 0, we can show that b(6*n-3) = 0.)

Examples

			a(1) = 1 since 1 + 1 is a Sophie Germain prime.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=a[n]=Det[Table[If[PrimeQ[i+j]==True&&PrimeQ[2(i+j)+1]==True,1,0],{i,1,n},{j,1,n}]]
    Table[a[n],{n,1,20}]
    Det/@Table[If[AllTrue[{i+j,2(i+j)+1},PrimeQ],1,0],{n,60},{i,n},{j,n}] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, May 26 2017 *)

A228561 Determinant of the n X n matrix with (i,j)-entry equal to 1 or 0 according as i + j and 4*(i + j)^2 + 1 are both prime or not.

Original entry on oeis.org

1, -1, -1, 0, 1, -1, -1, 0, 1, -1, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, -1, -1, 0, 4, -16, -9, 25, 4, -81, -81, 81, 841, -5929, -3969, 19600, 69169, -667489, -285156, 80656, 276676, -790321, -60025, 3136, 10816, -40000, -45369, 221841, 86436, -168100, -12100, 13225, 11881, -87616, -71289, 729
Offset: 1

Views

Author

Zhi-Wei Sun, Aug 25 2013

Keywords

Comments

Conjecture: a(n) is nonzero for each n > 28.
This implies that there are infinitely many primes p with 4*p^2 + 1 also prime. Note also that (-1)^{n*(n-1)/2}*a(n) is always a square in view of the comments in A228591.

Examples

			a(1) = 1 since  1 + 1 = 2 and 4*2^2 + 1 = 17 are both prime.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=a[n]=Det[Table[If[PrimeQ[i+j]==True&&PrimeQ[4(i+j)^2+1]==True,1,0],{i,1,n},{j,1,n}]]
    Table[a[n],{n,1,30}]

A228574 Determinant of the 2*n X 2*n matrix with (i,j)-entry equal to 1 or 0 according as i + j is a prime congruent to 1 mod 4 or not.

Original entry on oeis.org

0, 1, 0, 1, 0, 16, 0, 1, 0, 1, 0, 6561, 0, 0, 0, 0, 0, 0, 0, 6561, 0, 456976, 0, 65536, 0, 84934656, 0, 12745506816, 0, 335563778560000, 0, 1105346784523536, 0, 441194850625, 0, 986262467993856, 0, 80385880645971214336, 0, 6387622009837971841
Offset: 1

Views

Author

Zhi-Wei Sun, Aug 25 2013

Keywords

Comments

For the (2*n-1) X (2*n-1) determinant with (i,j)-entry equal to 1 or 0 according as i + j is a prime congruent to 1 mod 4 or not, it is easy to see that it vanishes since sum_{i=1}^{2*n-1} (i + tau(i) - 1) is not a multiple of 4 for any permutation tau of {1,...,2n-1}.
Conjecture: a(2*n-1) = 0 for all n > 0, and a(2*n) is nonzero when n > 9.
Zhi-Wei Sun could prove the following related result:
Let m be any positive even integer, and let D(m, n) denote the n X n determinant with (i,j)-entry equal to 1 or 0 according as i + j is a prime congruent to 1 mod m or not. Then (-1)^{n*(n-1)/2}*D(m,n) is always an m-th power. (It is easy to see that D(m,n) = 0 if m does not divide n^2.)

Crossrefs

Programs

  • Mathematica
    a[n_]:=a[n]=Det[Table[If[Mod[i+j,4]==1&&PrimeQ[i+j]==True,1,0],{i,1,2n},{j,1,2n}]]
    Table[a[n],{n,1,20}]

A071524 Determinant of n X n matrix defined by m(i,j)=1 if i^2+j^2 is a prime, m(i,j)=0 otherwise.

Original entry on oeis.org

1, -1, -1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 16, 25, -25, -100, 1, 81, -16, -36, 0, 1764, -3136, -196, 324, 16, -225, -1764, 1521, 9, -3969, -4356, 4761, 9, -1225, -19881, 5041, 156816, -312481, -167281, 219024, 3600, -186624, -158404, 5541316, 3020644, -19554084, -1350244, 198810000
Offset: 1

Views

Author

Benoit Cloitre, Jun 02 2002

Keywords

Comments

Terms are also perfect squares.
Conjecture: a(n) = 0 for no n > 28. - Zhi-Wei Sun, Aug 26 2013
General conjecture: Let m be any nonnegative integer, and let a(m,n) be the n X n determinant with (i,j)-entry equal to 1 or 0 according as i^{2^m}+j^{2^m} is prime or not. Then a(m,n) is nonzero for large n. (It can be proved that (-1)^(n*(n-1)/2)*a(m,n) is always a square, see the comments in A228591.) - Zhi-Wei Sun, Aug 26-27 2013

Crossrefs

Programs

  • Mathematica
    a[n_]:=a[n]=Det[Table[If[PrimeQ[i^2+j^2]==True, 1, 0], {i, 1, n}, {j, 1, n}]]; Table[a[n], {n, 1, 30}] (* Zhi-Wei Sun, Aug 26 2013 *)
    Table[Det[Table[If[PrimeQ[a^2+b^2],1,0],{a,n},{b,n}]],{n,60}] (* Harvey P. Dale, May 31 2019 *)
  • PARI
    for(n=1,60,print1(((matdet(matrix(n,n,i,j,isprime(i^2+j^2))))),","))

A228623 Determinant of the n X n matrix with (i,j)-entry (i,j = 0,...,n-1) equal to 1 or 0 according as n + i - j and n - i + j are both prime or not.

Original entry on oeis.org

0, 1, 1, 1, 0, -1, 0, 0, 0, -4, -1, 0, 0, 0, -6, 0, 0, -144, 0, 0, 0, -1, 168, 1024, 420, 0, 0, 0, -1, -9801, 0, 144, 0, 0, 3072, 7056, 0, 0, -42346434, 0, 0, -331776, 0, 0, 36528128, -104976, 96545145, 0, 34665386, -62500, 2826240, 2025, 0, -23174596, 0, 0, 255578880, -4, -3, 990172089
Offset: 1

Views

Author

Zhi-Wei Sun, Aug 27 2013

Keywords

Comments

Conjecture: a(n) is nonzero if n is odd and greater than 120.
This implies Goldbach's conjecture for even numbers of the form 4*k + 2.

Examples

			a(1) = 0 since 1 + 0 - 0 = 1 is not a prime.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=Det[Table[If[PrimeQ[n+j-i]==True&&PrimeQ[n+i-j]==True,1,0],{i,0,n-1},{j,0,n-1}]]
    Table[a[n],{n,1,20}]
Showing 1-10 of 11 results. Next