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”).

A218585
Number of ways to write n as x+y with 0<x<=y and x^2+xy+y^2 prime.
13
0, 1, 1, 1, 1, 1, 2, 0, 3, 1, 2, 1, 3, 2, 3, 2, 2, 1, 4, 1, 4, 3, 4, 2, 3, 3, 3, 3, 5, 2, 6, 2, 4, 4, 5, 3, 5, 2, 8, 4, 4, 4, 7, 3, 5, 2, 8, 4, 7, 2, 8, 4, 7, 5, 7, 4, 7, 3, 8, 4, 9, 3, 11, 4, 8, 5, 10, 4, 9, 5, 9, 6, 8, 5, 6, 6, 10, 5, 10, 3, 12, 7, 10, 6, 8, 6, 11, 4, 7, 4, 15, 8, 13, 6, 9, 5, 15, 9, 10
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, 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
Cf. A002476.
Sequence in context: A318326 A329646 A293813 * A279507 A054656 A080096
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Nov 03 2012
STATUS
approved