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.

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

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Nov 04 2012

Keywords

Comments

Conjecture: a(n)>0 for all n>=1188.
Conjecture verified for n up to 10^9. - Mauro Fiorentini, Sep 23 2023
This conjecture is stronger than both Goldbach's conjecture and Lemoine's conjecture.
Zhi-Wei Sun also made the following conjecture: Given any positive odd integer d, there is a prime p(d) such that for any prime p>p(d) there is a prime q

Conjecture verified for d up to 100 and p up to 10^7. - Mauro Fiorentini, Sep 23 2023

Examples

			For n=72 we have a(72)=1 since the only primes p and q with p+q=72, q<=36 and p^2+3pq+q^2 prime are p=67 and q=5.
		

Crossrefs

Cf. A000034 = 1,2,1,2,... = (3-(-1)^n)/2. (Note: Offset shifted w.r.t. use in the definition of this sequence.) - M. F. Hasler, Nov 05 2012

Programs

  • Mathematica
    a[n_]:=a[n]=Sum[If[PrimeQ[q]==True&&PrimeQ[n-q(3-(-1)^n)/2]&&PrimeQ[q^2+3q(n-q(3-(-1)^n)/2)+(n-q(3-(-1)^n)/2)^2]==True,1,0],{q,1,n/2}]
    Do[Print[n," ",a[n]],{n,1,20000}]