cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

This page as a plain text file.
%I A218585 #29 Aug 04 2020 13:24:57
%S A218585 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,
%T A218585 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,
%U A218585 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
%N A218585 Number of ways to write n as x+y with 0<x<=y and x^2+xy+y^2 prime.
%C A218585 Conjecture: a(n)>0 for all n>1 with the only exception n=8.
%C A218585 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.
%C A218585 Zhi-Wei Sun also conjectured that
%C A218585 (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.
%C A218585 Or, the number of primes of the form n*x+(n-x)^2 with 0<x<n/2.
%C A218585 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
%D A218585 Thomas Ordowski, Personal e-mail messages, Oct. 3-4, 2012, and Nov. 3, 2012.
%H A218585 Zhi-Wei Sun, <a href="/A218585/b218585.txt">Table of n, a(n) for n = 1..20000</a>
%H A218585 Zhi-Wei Sun, <a href="http://arxiv.org/abs/1211.1588">Conjectures involving primes and quadratic forms</a>, arXiv preprint arXiv:1211.1588, 2012.
%e A218585 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.
%t A218585 A[n_]:=A[n]=Sum[If[PrimeQ[x^2+x(n-x)+(n-x)^2]==True,1,0],{x,1,n/2}]
%t A218585 Do[Print[n," ",A[n]],{n,1,20000}]
%t A218585 Table[Count[IntegerPartitions[n,{2}],_?(PrimeQ[#[[1]]^2+#[[1]]#[[2]]+ #[[2]]^2]&)],{n,100}] (* _Harvey P. Dale_, Aug 04 2020 *)
%o A218585 (PARI) A218585(n)=sum(x=1,n\2,isprime(x^2+x*(n-x)+(n-x)^2))  \\ - _M. F. Hasler_, Nov 03 2012
%Y A218585 Cf. A002476.
%K A218585 nonn
%O A218585 1,7
%A A218585 _Zhi-Wei Sun_, Nov 03 2012