login
A390730
Number of ways to write 6*n+2 as an unordered sum of four squares of elements in the set {m >= 0: m = 0 or 2*m is practical}.
2
1, 1, 1, 2, 2, 1, 2, 1, 2, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 2, 3, 1, 2, 2, 4, 3, 2, 4, 3, 2, 5, 2, 2, 5, 2, 3, 5, 1, 4, 4, 5, 3, 3, 4, 4, 4, 5, 2, 7, 5, 3, 5, 4, 2, 6, 4, 5, 5, 5, 5, 6, 3, 5, 3, 3, 7, 2, 5, 6, 3, 7, 4, 7, 6, 4, 7, 5, 4, 7, 4, 9, 7, 4, 6, 6, 1, 7, 5, 6, 6, 4, 5, 8, 4, 7, 4, 6, 7, 6, 6, 6
OFFSET
0,4
COMMENTS
Conjecture: Let S be the set of those natural numbers m such that 2*m is either zero or practical. Then any integer n >= 0 with n == 0,1 (mod 4) or n == 2,4 (mod 6) can be written as w^2 + x^2 + y^2 + z^2 with w,x,y,z in the set S.
This has been verified for n <= 6*10^5.
See also A389523 for related conjectures.
LINKS
Zhi-Wei Sun, Refining Lagrange's four-square theorem, J. Number Theory 175(2017), 167-190.
EXAMPLE
a(0) = 1 since 6*0 + 2 = 0^2 + 0^2 + 1^2 + 1^2 with 2*1 = 2 practical.
a(2) = 1 since 6*2 + 2 = 14 = 0^2 + 1^2 + 2^2 + 3^2 with 2*1 = 2, 2*2 = 4 and 2*6 = 6 all practical.
a(10) = 1 since 6*10 + 2 = 62 = 1^2 + 3^2 + 4^2 + 6^2 with 2*1 = 2, 2*3 = 6, 2*4 = 8 and 2*6 = 12 all practical.
a((4^k-1)/3) = 1 since 6*(4^k-1)/3 + 2 = 2^(2k+1) = 0^2 + 0^2 + (2^k)^2 + (2^k)^2 with 2*2^k = 2^(k+1) practical.
a((7*4^k-1)/3) = 1 since 6*(7*4^k-1)/3 + 2 = 14*4^k = 0^2 + (2^k)^2 + (2^(k+1))^2 + (3*2^k)^2 with 2*2^k, 2*2^(k+1) and 6*2^k all practical.
MATHEMATICA
f[n_]:=f[n]=FactorInteger[n];
Pow[n_, i_]:=Pow[n, i]=Part[Part[f[n], i], 1]^(Part[Part[f[n], i], 2]);
Con[n_]:=Con[n]=Sum[If[Part[Part[f[n], s+1], 1]<=DivisorSigma[1, Product[Pow[n, i], {i, 1, s}]]+1, 0, 1], {s, 1, Length[f[n]]-1}];
pr[n_]:=pr[n]=n>0&&(n<3||Mod[n, 2]+Con[n]==0);
pq[n_]:=pq[n]=IntegerQ[n]&&(n==0||pr[2n]);
tab={}; Do[m=0; Do[If[pq[x]&&pq[y]&&pq[z]&&pq[Sqrt[6n+2-x^2-y^2-z^2]], m=m+1], {x, 0, Sqrt[(6n+2)/4]}, {y, x, Sqrt[(6n+2-x^2)/3]}, {z, y, Sqrt[(6n+2-x^2-y^2)/2]}]; tab=Append[tab, m], {n, 0, 100}]; Print[tab]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Nov 16 2025
STATUS
approved