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.

A258139 Number of ways to write n as p^2 + q with p and q both prime.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 2, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 2, 2, 0, 1, 0, 2, 1, 0, 1, 1, 0, 2, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 2, 2, 0, 2, 0, 3, 1, 0, 0, 1, 0, 3, 1, 0, 1, 2, 0, 3, 0, 1, 1, 2, 0, 0, 1, 1, 1, 2, 0, 2, 0, 1, 1, 1, 0, 2, 1, 1, 0, 1, 0, 3, 1, 0, 0, 2, 0, 2, 0, 0
Offset: 1

Views

Author

Zhi-Wei Sun, May 22 2015

Keywords

Comments

Conjecture: For any integer n > 0, we have a(n+r) > 0 for some r = 0,1,2,3,4,5. Moreover, if n = 6*k + 2, then a(n) > 0 except for k = 0, 1, 12, 28, 102, 117, 168, 4079.
We have verified the conjecture for n up to 10^9.

Examples

			a(11) = 2 since 11 = 2^2 + 7 = 3^2 + 2 with 2, 3, 7 all prime.
		

Crossrefs

Programs

  • Mathematica
    Do[r=0;Do[If[PrimeQ[n-Prime[k]^2],r=r+1],{k,1,PrimePi[Sqrt[n]]}];Print[n," ",r];Continue,{n,1,100}]

Formula

G.f.: (Sum_{k>=1} x^prime(k))*(Sum_{k>=1} x^(prime(k)^2)). - Ilya Gutkovskiy, Feb 05 2017