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

A228591 Determinant of the n X n (0,1)-matrix with (i,j)-entry equal to 1 if and only if i + j is 2 or an odd composite number.

Original entry on oeis.org

1, 0, 0, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, -1, -9, 81, 9, -1225, -2500, 2500, 2500, -225, -121, 841, 19044, -29584, -355216, 1527696, 141376, -40000, -40000, 10000, 59536, -258064, -139876, 935089, 885481, -16384, -1876900, 1710864, 818875456, -22896531856, -23799232900, 66328911936, 158281561, -45320023225
Offset: 1

Views

Author

Zhi-Wei Sun, Aug 27 2013

Keywords

Comments

Conjecture: a(n) = 0 for no n > 15.
We observe that (-1)^{n*(n-1)/2}*a(n) is always a square. This is a special case of the following general result established by Zhi-Wei Sun.
Theorem: Let M = (m_{i,j}) be an n X n symmetric matrix over a commutative ring. Suppose that the (i,j)-entry m_{i,j} is zero whenever i + j is even and greater than 2. If n is even, then (-1)^{n/2}*det(M) = D(n)^2, where D(n) denotes the determinant |m_{2i,2j-1}|{i,j = 1,...,n/2}. If n is odd, then (-1)^{(n-1)/2}*det(M) = m{1,1}*D(n)^2, where D(n) is the determinant |m_{2i,2j+1}|_{i,j = 1,...,(n-1)/2}.
This theorem extends the result mentioned in A069191.

Crossrefs

Programs

  • Mathematica
    a[n_]:=a[n]=Det[Table[If[(i+j==2)||(Mod[i+j,2]==1&&PrimeQ[i+j]==False),1,0],{i,1,n},{j,1,n}]]
    Table[a[n],{n,1,50}]

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

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

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))))),","))

A273012 Totient of the n-th semiprime.

Original entry on oeis.org

2, 2, 6, 4, 6, 8, 12, 10, 20, 12, 20, 16, 24, 18, 24, 22, 42, 32, 40, 36, 28, 30, 48, 44, 36, 60, 40, 64, 42, 56, 72, 60, 46, 72, 52, 72, 88, 58, 96, 110, 60, 80, 84, 108, 66, 92, 70, 120, 112, 72, 120, 78, 104, 132, 82, 156, 116, 88, 120, 144, 160, 96, 132, 100
Offset: 1

Views

Author

Altug Alkan, May 13 2016

Keywords

Examples

			a(3) = 6 because A000010(9) = 2*3 = 6.
		

Crossrefs

Cf. A000010, A001358, A006093 (totients of primes), A006881, A228578.

Programs

  • Maple
    A273012 := proc(n)
        numtheory[phi](A001358(n)) ;
    end proc:
    seq(A273012(n),n=1..40) ; # R. J. Mathar, Nov 13 2016
  • Mathematica
    EulerPhi@ Select[Range@ 202, PrimeOmega@ # == 2 &] (* Michael De Vlieger, May 13 2016 *)
  • PARI
    lista(nn) = for(n=1, nn, if(bigomega(n) == 2, print1(eulerphi(n), ", ")));

Formula

a(n) = phi(semiprime(n)) = A000010(A001358(n)), where phi is Euler's totient function.
If A001358(n) = p^2, then a(n) = p*(p-1).
If A001358(n) = p*q where p and q are distinct, then a(n) = (p-1)*(q-1).
If A001358(n) = A006881(i), then a(n) = n+1-A228578(i). - R. J. Mathar, Nov 13 2016
Showing 1-6 of 6 results.