OFFSET
1,7
COMMENTS
Conjecture: a(n)>0 for all n>1 with the only exception n=8.
Note that any prime p=1(mod 3) can be written uniquely in the form x(p)^2+x(p)y(p)+y(p)^2 with x(p)>y(p)>0.
Zhi-Wei Sun also conjectured that
(sum_{p<N, p=1(mod 3)}x(p))/(sum_{p<N, p=1(mod 3)}y(p)) tends to 1+sqrt(3), and (sum_{p<N, p=1(mod 3)}x(p)^2)/(sum_{p<N, p=1(mod 3)}y(p)^2) tends to 52/9. Similar conjectures involving p=x^2+y^2 were recently formulated by Thomas Ordowski.
Or, the number of primes of the form n*x+(n-x)^2 with 0<x<n/2.
Suggestion: the number of primes of the form n*x+(n-x)^2 with 0<x<n/3 is positive for n>12. - Zak Seidov_, Sep 25 2013
REFERENCES
Thomas Ordowski, Personal e-mail messages, Oct. 3-4, 2012, and Nov. 3, 2012.
LINKS
Zhi-Wei Sun, Table of n, a(n) for n = 1..20000
Zhi-Wei Sun, Conjectures involving primes and quadratic forms, arXiv preprint arXiv:1211.1588, 2012.
EXAMPLE
For n=20 we have a(20)=1 since x^2+x(20-x)+(20-x)^2 with 0<x<=10 is prime only when x=3.
MATHEMATICA
A[n_]:=A[n]=Sum[If[PrimeQ[x^2+x(n-x)+(n-x)^2]==True, 1, 0], {x, 1, n/2}]
Do[Print[n, " ", A[n]], {n, 1, 20000}]
Table[Count[IntegerPartitions[n, {2}], _?(PrimeQ[#[[1]]^2+#[[1]]#[[2]]+ #[[2]]^2]&)], {n, 100}] (* Harvey P. Dale, Aug 04 2020 *)
PROG
(PARI) A218585(n)=sum(x=1, n\2, isprime(x^2+x*(n-x)+(n-x)^2)) \\ - M. F. Hasler, Nov 03 2012
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Nov 03 2012
STATUS
approved