login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Number of ways to write n=x+y (0<x<=y) with n^2-xy and n^2+xy both prime
6

%I #10 Nov 29 2012 14:00:43

%S 0,1,1,1,1,1,1,0,2,0,1,1,3,2,3,1,1,0,2,0,2,1,3,1,2,1,3,2,4,2,2,1,1,2,

%T 4,2,3,2,4,3,0,1,2,2,1,0,4,1,4,1,6,2,1,2,6,1,3,0,1,3,5,2,7,2,1,2,4,1,

%U 3,3,5,2,1,2,2,2,4,0,3,1,5,2,4,3,2,3,2,3,2,1,4,3,3,2,3,2,7,1,5,5

%N Number of ways to write n=x+y (0<x<=y) with n^2-xy and n^2+xy both prime

%C Conjecture: a(n)>0 if n is not among 1, 8, 10, 18, 20, 41, 46, 58, 78, 116, 440.

%C Zhi-Wei Sun also made the following general conjecture:

%C For any k=0,1,2,4,5,6,... and positive odd integer m, each sufficiently large integer n can be written as x+y (0<x<=y) with |m*n^k-xy| and |m*n^k+xy| all prime.

%C For example, if n>6 is different from 24 then n can be written as x+y with x,y positive, and xy-n and xy+n both prime; if n>308 then n can be written as x+y with x,y positive, and 3n^2-xy and 3n^2+xy both prime.

%H Zhi-Wei Sun, <a href="/A219782/b219782.txt">Table of n, a(n) for n = 1..10000</a>

%H Zhi-Wei Sun, <a href="http://arxiv.org/abs/1211.1588">Conjectures involving primes and quadratic forms</a>, arXiv:1211.1588.

%e a(9)=2 since 9=1+8=4+5 with 9^2+1*8, 9^2-1*8, 9^2+4*5, 9^2-4*5 all prime.

%t a[n_]:=a[n]=Sum[If[PrimeQ[n^2-k(n-k)]==True&&PrimeQ[n^2+k(n-k)]==True,1,0],{k,1,n/2}]

%t Do[Print[n," ",a[n]],{n,1,10000}]

%Y Cf. A091182, A218585, A218654.

%K nonn

%O 1,9

%A _Zhi-Wei Sun_, Nov 27 2012