login
A390762
Number of ways to write n as (p-1)^2 + (q-1)^2 + (r-1)^2/2 + (s-1)^2/4 with p <= q, where each of p,q,r,s is either 1 or an odd prime.
6
1, 1, 1, 1, 2, 1, 2, 1, 3, 3, 2, 2, 3, 2, 1, 1, 3, 4, 2, 3, 3, 2, 4, 2, 2, 4, 3, 4, 2, 3, 1, 3, 2, 4, 2, 4, 3, 3, 5, 2, 4, 5, 4, 5, 5, 3, 2, 4, 3, 4, 2, 4, 4, 3, 7, 3, 2, 2, 7, 6, 2, 3, 3, 5, 3, 2, 2, 4, 2, 2, 6, 2, 5, 3, 6, 4, 6, 2, 2, 5, 6, 5, 3, 5, 4, 3, 6, 2, 3, 5, 7, 5, 3, 2, 4, 3, 3, 5, 2, 5, 2
OFFSET
0,5
COMMENTS
Conjecture: Let S = {(p-1)/2: p is 1 or an odd prime}. Then each nonnegative integer n can be written as w^2 + b*x^2 + c*y^2 + d*z^2 with w,x,y,z in the set S, provided that (b,c,d) is among the following 25 triples: (1,2,3),(1,2,4),(1,2,5),(1,2,6),(1,2,7),(1,2,12),(1,3,5),(1,3,6),(2,2,3),(2,2,5),(2,3,3),(2,3,4),(2,3,5),(2,3,7),(2,3,9),(2,3,10),(2,4,4),(2,4,5),(2,4,9),(2,4,10),(2,4,11),(2,4,12),(2,5,7),(2,5,8),(2,5,9).
This conjecture holds for (b,c,d) = (2,4,4) if and only if a(n) > 0 for all n >= 0. We have verified a(n) > 0 for all n <= 10^6. It seems that a(n) = 1 only for n = 0, 1, 2, 3, 5, 7, 14, 15, 30, 120, 130, 754, 770, 1186, 2290.
REFERENCES
S. Ramanujan, On the expression of a number in the form a*x^2 + b*y^2 + c*z^2 + d*w^2, Proc. Cambridge Philos. Soc. 19 (1917), 11-21.
LINKS
S. Ramanujan, On the expression of a number in the form a*x^2 + b*y^2 + c*z^2 + d*u^2, Proc. Cambridge Philos. Soc. 19 (1917), 11-21.
Zhi-Wei Sun, Can w^2 + b*x^2 + c*y^2 + d*z^2 be universal over a sparse subset of N?, Question 504012 at MathOverflow, Nov 17 2025.
EXAMPLE
a(7) = 1 since 7 = (1-1)^2 + (3-1)^2 + (3-1)^2/2 + (3-1)^2/4 with 3 prime.
a(120) = 1 since 120 = (5-1)^2 + (11-1)^2 + (1-1)^2/2 + (5-1)^2/4 with 5 and 11 prime.
a(754) = 1 since 754 = (17-1)^2 + (17-1)^2 + (23-1)^2/2 + (1-1)^2/4 with 17 and 23 both prime.
a(770) = 1 since 770 = (1-1)^2 + (17-1)^2 + (31-1)^2/2 + (17-1)^2/4 with 17 and 31 both prime.
a(1186) = 1 since 1186 = (1-1)^2 + (29-1)^2 + (3-1)^2/2 + (41-1)^2/4 with 29, 3 and 41 prime.
a(2290) = 1 since 2290 = (13-1)^2 + (37-1)^2 + (31-1)^2/2 + (41-1)^2/4 with 13, 37, 31 and 41 all prime.
MATHEMATICA
pq[n_]:=pq[n]=IntegerQ[n]&&(n==0||PrimeQ[2n+1]);
tab={}; Do[m=0; Do[If[pq[x]&&pq[y]&&pq[z]&&pq[Sqrt[n-4x^2-4y^2-2z^2]], m=m+1], {x, 0, Sqrt[n/8]},
{y, x, Sqrt[(n-4x^2)/4]}, {z, 0, Sqrt[(n-4x^2-4y^2)/2]}]; tab=Append[tab, m], {n, 0, 100}]; Print[tab]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Nov 18 2025
STATUS
approved