

A218654


Number of ways to write n as x+y with 0<x<=y and x^2+3xy+y^2 prime.


12



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, 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, 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
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,5


COMMENTS

Conjecture: a(n)>0 for all n=2,3,4,...
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.
ZhiWei Sun also conjectured that
(sum_{p<N, p=1,1(mod 5)}x(p))
/(sum_{p<N, p=1,1(mod 5)}y(p))
has the limit 1+sqrt(5) as N tends to the infinity.
These conjectures are similar to the ones mentioned in the comments in A218585.


LINKS

ZhiWei Sun, Table of n, a(n) for n = 1..20000
ZhiWei Sun, Conjectures involving primes and quadratic forms, arXiv preprint arXiv:1211.1588, 2012.


EXAMPLE

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.


MATHEMATICA

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}]
Table[Count[IntegerPartitions[n, {2}], _?(PrimeQ[#[[1]]^2+3Times@@#+ #[[2]]^2]&)], {n, 110}] (* Harvey P. Dale, Feb 28 2018 *)


PROG

(PARI) A218654(n)=sum(x=1, n\2, isprime(x^2+(2*x+n)*(nx))) \\  M. F. Hasler, Nov 05 2012


CROSSREFS

Cf. A038872, A218585.
Sequence in context: A223853 A023645 A167865 * A054571 A126865 A104640
Adjacent sequences: A218651 A218652 A218653 * A218655 A218656 A218657


KEYWORD

nonn


AUTHOR

ZhiWei Sun, Nov 03 2012


STATUS

approved



