login
A219782
Number of ways to write n=x+y (0<x<=y) with n^2-xy and n^2+xy both prime
6
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, 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, 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
OFFSET
1,9
COMMENTS
Conjecture: a(n)>0 if n is not among 1, 8, 10, 18, 20, 41, 46, 58, 78, 116, 440.
Zhi-Wei Sun also made the following general conjecture:
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.
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.
EXAMPLE
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.
MATHEMATICA
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}]
Do[Print[n, " ", a[n]], {n, 1, 10000}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Nov 27 2012
STATUS
approved