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

Number of ordered ways to write n as x^2 + 2*y^2 + p*(p+d)/2, where x and y are nonnegative integers, d is 1 or -1, and p is prime.
4

%I #5 Oct 31 2015 14:01:30

%S 1,1,3,3,3,3,4,1,4,4,3,7,2,4,5,2,3,4,7,3,7,5,4,5,5,3,5,8,3,8,3,4,6,5,

%T 4,5,10,2,11,4,2,6,3,6,3,7,5,5,3,3,6,5,6,8,7,3,9,5,4,9,5,4,4,8,4,5,8,

%U 2,11,5,5,9,5,6,8,6,5,10,8,3,4,13,4,10,7,4,12,6,7,4,10,6,7,6,4,9,5,5,8,11

%N Number of ordered ways to write n as x^2 + 2*y^2 + p*(p+d)/2, where x and y are nonnegative integers, d is 1 or -1, and p is prime.

%C Conjecture: a(n) > 0 for all n > 0, and a(n) = 1 only for n = 1, 2, 8.

%C This is similar to the conjecture in A262785.

%H Zhi-Wei Sun, <a href="/A263998/b263998.txt">Table of n, a(n) for n = 1..10000</a>

%H Zhi-Wei Sun, <a href="http://listserv.nodak.edu/cgi-bin/wa.exe?A2=NMBRTHRY;6f4ac126.1510">Some mysterious representations of integers</a>, a message to Number Theory Mailing List, Oct. 25, 2015.

%e a(1) = 1 since 1 = 0^2 + 2*0^2 + 2*(2-1)/2 with 2 prime.

%e a(2) = 1 since 2 = 1^2 + 2*0^2 + 2*(2-1)/2 with 2 prime.

%e a(8) = 1 since 8 = 0^2 + 2*1^2 + 3*(3+1)/2 with 3 prime.

%t SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]]

%t f[d_, n_]:=f[d,n]=Prime[n](Prime[n]+(-1)^d)/2

%t Do[r=0; Do[If[SQ[n-f[d, k]-2x^2], r=r+1], {d, 0, 1}, {k, 1, PrimePi[(Sqrt[8n+1]-(-1)^d)/2]}, {x, 0, Sqrt[(n-f[d, k])/2]}]; Print[n, " ", r]; Continue, {n, 1, 100}]

%Y Cf. A000040, A000217, A000290, A262311, A262785, A263992.

%K nonn

%O 1,3

%A _Zhi-Wei Sun_, Oct 31 2015