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

A219055 Number of ways to write n = p+q(3-(-1)^n)/2 with p>q and p, q, p-6, q+6 all prime.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 2, 0, 1, 1, 1, 1, 3, 1, 1, 2, 2, 1, 3, 1, 1, 2, 2, 1, 3, 1, 0, 2, 2, 1, 2, 2, 1, 2, 1, 1, 2, 1, 2, 2, 2, 2, 3, 1, 1, 3, 2, 1, 4, 1, 0, 3, 3, 1, 3, 1, 1, 3, 3, 1, 2, 2, 2, 2, 2, 2, 3, 1, 3, 3, 1, 2, 6, 1, 2, 2, 1, 3, 5, 0, 1, 4, 2, 1, 4, 0, 1, 4, 3
Offset: 1

Views

Author

Zhi-Wei Sun, Nov 11 2012

Keywords

Comments

Conjecture: a(n) > 0 for all even n > 8012 and odd n > 15727.
This implies Goldbach's conjecture, Lemoine's conjecture and the conjecture that there are infinitely many primes p with p+6 also prime.
It has been verified for n up to 10^8.
Zhi-Wei Sun also made the following general conjecture: For any two multiples d_1 and d_2 of 6, all sufficiently large integers n can be written as p+q(3-(-1)^n)/2 with p>q and p, q, p-d_1, q+d_2 all prime. For example, for (d_1,d_2) = (-6,6),(-6,-6),(6,-6),(12,6),(-12,-6), it suffices to require that n is greater than 15721, 15733, 15739, 16349, 16349 respectively.

Examples

			a(18) = 2 since 18 = 5+13 = 7+11 with 5+6, 13-6, 7+6, 11-6 all prime.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=a[n]=Sum[If[PrimeQ[Prime[k]+6]==True&&PrimeQ[n-(1+Mod[n,2])Prime[k]]==True&&PrimeQ[n-(1+Mod[n,2])Prime[k]-6]==True,1,0],{k,1,PrimePi[(n-1)/(2+Mod[n,2])]}]
    Do[Print[n," ",a[n]],{n,1,100000}]
  • PARI
    A219055(n)={my(c=1+bittest(n, 0), s=0); forprime(q=1, (n-1)\(c+1), isprime(q+6) && isprime(n-c*q) && isprime(n-c*q-6) && s++); s} \\ M. F. Hasler, Nov 11 2012

A219052 Number of ways to write n = p + q(3 - (-1)^n)/2 with q <= n/2 and p, q, p^2 + q^2 - 1 all prime.

Original entry on oeis.org

0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 2, 1, 1, 0, 2, 1, 1, 0, 2, 2, 0, 2, 1, 0, 0, 1, 1, 3, 0, 1, 1, 1, 1, 3, 1, 1, 4, 0, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 4, 0, 0, 3, 0, 1, 2, 2, 1, 3, 1, 2, 3, 2, 1, 3, 2, 4, 2, 1, 2, 1, 1, 0, 4, 2, 1, 1, 1, 2, 5, 4, 1, 3, 1, 1, 4, 1, 1, 2, 2
Offset: 1

Views

Author

Zhi-Wei Sun, Nov 10 2012

Keywords

Comments

Conjecture: a(n) > 0 for all n > 784.
This conjecture implies Goldbach's conjecture, Lemoine's conjecture, and that there are infinitely many primes of the form p^2 + q^2 - 1 with p and q both prime.
It has been verified for n up to 10^8.
Zhi-Wei Sun also made the following general conjecture: Let d be any odd integer not congruent to 1 modulo 3. Then, all large even numbers can be written as p + q with p, q, p^2 + q^2 + d all prime. If d is also not divisible by 5, then all large odd numbers can be represented as p + 2q with p, q, p^2 + q^2 + d all prime.

Examples

			a(12) = 1 since {5, 7} is the only prime pair {p, q} for which  p + q = 12, and p^2 + q^2 - 1 is prime.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := a[n] = Sum[If[PrimeQ[n - (1 + Mod[n, 2])Prime[k]] == True && PrimeQ[Prime[k]^2 + (n - (1 + Mod[n, 2])Prime[k])^2 - 1] == True, 1, 0], {k, 1, PrimePi[n/2]}]; Do[Print[n, " ", a[n]], {n, 1, 20000}]
Showing 1-2 of 2 results.