%I
%S 0,1,1,1,2,1,2,2,2,1,4,1,4,2,4,2,3,2,6,3,4,3,6,2,6,3,4,3,8,3,8,2,5,5,
%T 8,4,8,6,5,4,8,2,10,6,6,3,11,4,9,6,9,7,10,4,14,6,9,3,11,4,12,7,9,10,
%U 10,4,11,5,10,9,15,4,15,9,9,8,14,6,12,8,9,8,18,4,17,11,9,11,20,5,14,10,13,7,16,9,17,6,16,10
%N Number of ways to write n as x+y with 0<x<=y and x^2+3xy+y^2 prime.
%C Conjecture: a(n)>0 for all n=2,3,4,...
%C It is known that any prime p = 1 or 1 (mod 5) can be written uniquely in the form x(p)^2+3x(p)y(p)+y(p)^2 with x(p)>y(p)>0.
%C ZhiWei Sun also conjectured that
%C (sum_{p<N, p=1,1(mod 5)}x(p))
%C /(sum_{p<N, p=1,1(mod 5)}y(p))
%C has the limit 1+sqrt(5) as N tends to the infinity.
%C These conjectures are similar to the ones mentioned in the comments in A218585.
%H ZhiWei Sun, <a href="/A218654/b218654.txt">Table of n, a(n) for n = 1..20000</a>
%H ZhiWei Sun, <a href="http://arxiv.org/abs/1211.1588">Conjectures involving primes and quadratic forms</a>, arXiv preprint arXiv:1211.1588, 2012.
%e For n=12 we have a(12)=1 since x^2+3x(12x)+(12x)^2 with 0<x<=6 is prime only when x=5.
%t a[n_]:=a[n]=Sum[If[PrimeQ[x^2+3x(nx)+(nx)^2]==True,1,0],{x,1,n/2}]; Do[Print[n," ",a[n]],{n,1,20000}]
%t Table[Count[IntegerPartitions[n,{2}],_?(PrimeQ[#[[1]]^2+3Times@@#+ #[[2]]^2]&)], {n,110}] (* _Harvey P. Dale_, Feb 28 2018 *)
%o (PARI) A218654(n)=sum(x=1,n\2,isprime(x^2+(2*x+n)*(nx))) \\  _M. F. Hasler_, Nov 05 2012
%Y Cf. A038872, A218585.
%K nonn
%O 1,5
%A _ZhiWei Sun_, Nov 03 2012
