A074590
Number of primitive solutions to n = x^2 + y^2 + z^2 (i.e., with gcd(x,y,z) = 1).
Original entry on oeis.org
1, 6, 12, 8, 0, 24, 24, 0, 0, 24, 24, 24, 0, 24, 48, 0, 0, 48, 24, 24, 0, 48, 24, 0, 0, 24, 72, 24, 0, 72, 48, 0, 0, 48, 48, 48, 0, 24, 72, 0, 0, 96, 48, 24, 0, 48, 48, 0, 0, 48, 72, 48, 0, 72, 72, 0, 0, 48, 24, 72, 0, 72, 96, 0, 0, 96, 96, 24, 0, 96, 48, 0, 0, 48, 120
Offset: 0
G.f. = 1 + 6*x + 12*x^2 + 8*x^3 + 24*x^5 + 24*x^6 + 24*x^9 + 24*x^10 + 24*x^11 + ...
- See A005875 for references.
- E. Grosswald, Representations of Integers as Sums of Squares. Springer-Verlag, NY, 1985, p. 54.
-
a[n_] := (r = Reduce[ GCD[x, y, z] == 1 && n == x^2 + y^2 + z^2, {x, y, z}, Integers]; If[ r === False, 0, Length[ {ToRules[r]} ] ] ); a[0] = 1; Table[ a[n], {n, 0, 100}] (* Jean-François Alcover, Jan 13 2012 *)
a[ n_] := If[ n < 1, Boole[n == 0], Length @ Select[ {x, y, z} /. FindInstance[ n == x^2 + y^2 + z^2, {x, y, z}, Integers, 10^9], 1 == GCD @@ # &]]; (* Michael Somos, May 21 2015 *)
A133104
Number of partitions of n^4 into n nonzero squares.
Original entry on oeis.org
1, 0, 3, 1, 49, 732, 9659, 190169, 3225654, 61896383, 1360483727, 30969769918, 778612992660, 20749789703573, 579672756740101, 17115189938667708, 525530773660159970, 16825686497823918869, 561044904645283065043, 19368002907483932784642
Offset: 1
a(3)=3 because there are 3 ways to express 3^4 = 81 as a sum of 3 nonzero squares: 81 = 1^2 + 4^2 + 8^2 = 3^2 + 6^2 + 6^2 = 4^2 + 4^2 + 7^2.
a(4)=1 because the only way to express 4^4 = 256 as a sum of 4 nonzero squares is 256 = 8^2 + 8^2 + 8^2 + 8^2.
Cf.
A133105 (number of ways to express n^4 as a sum of n distinct nonzero squares),
A133103 (number of ways to express n^3 as a sum of n nonzero squares).
-
a(i, n, k)=local(s, j); if(k==1, if(issquare(n), return(1), return(0)), s=0; for(j=ceil(sqrt(n/k)), min(i, floor(sqrt(n-k+1))), s+=a(j, n-j^2, k-1)); return(s)) for(n=1,50, m=n^4; k=n; print1(a(m, m, k)", ") ) \\ Herman Jamke (hermanjamke(AT)fastmail.fm), Dec 16 2007
a(9) from Herman Jamke (hermanjamke(AT)fastmail.fm), Dec 16 2007
A255844
a(n) = 2*n^2 + 6.
Original entry on oeis.org
6, 8, 14, 24, 38, 56, 78, 104, 134, 168, 206, 248, 294, 344, 398, 456, 518, 584, 654, 728, 806, 888, 974, 1064, 1158, 1256, 1358, 1464, 1574, 1688, 1806, 1928, 2054, 2184, 2318, 2456, 2598, 2744, 2894, 3048, 3206, 3368, 3534, 3704, 3878, 4056, 4238, 4424, 4614
Offset: 0
Cf.
A152811: nonnegative numbers of the form 2*m^2-6.
Cf. similar sequences listed in
A255843.
-
[2*n^2+6: n in [0..50]];
-
Table[2 n^2 + 6, {n, 0, 50}]
-
vector(50, n, n--; 2*n^2+6)
-
[2*n^2+6 for n in (0..50)]
A294712
Numbers that are the sum of three squares (square 0 allowed) in exactly nine ways.
Original entry on oeis.org
425, 521, 545, 569, 614, 650, 701, 725, 729, 774, 809, 810, 845, 857, 953, 974, 989, 990, 1053, 1062, 1070, 1074, 1091, 1118, 1134, 1139, 1166, 1179, 1217, 1249, 1251, 1262, 1266, 1277, 1298, 1310, 1418, 1446, 1458, 1470, 1525, 1541, 1546, 1571, 1594, 1611
Offset: 1
545 = 8^2 + 15^2 + 16^2
= 0^2 + 16^2 + 17^2
= 10^2 + 11^2 + 18^2
= 5^2 + 14^2 + 18^2
= 8^2 + 9^2 + 20^2
= 1^2 + 12^2 + 20^2
= 2^2 + 10^2 + 21^2
= 5^2 + 6^2 + 22^2
= 0^2 + 4^2 + 23^2. - _Robert Israel_, Nov 08 2017
Cf.
A000164,
A005875,
A000378,
A094942,
A224442,
A224443,
A294577,
A294594,
A294595,
A294710,
A294711.
-
N:= 10000: # to get all terms <= N
V:= Array(0..N):
for i from 0 to isqrt(N) do
for j from 0 to i while i^2 + j^2 <= N do
for k from 0 to j while i^2 + j^2 + k^2 <= N do
t:= i^2 + j^2 + k^2;
V[t]:= V[t]+1;
od od od:
select(t -> V[t] = 9, [$1..N]); # Robert Israel, Nov 08 2017
-
Select[Range[0, 1000], Length[PowersRepresentations[#, 3, 2]] == 9 &]
Updated Mathematica program to Version 11. by
Robert Price, Nov 01 2019
A309779
Squares that can be expressed as the sum of two positive squares but not as the sum of three positive squares.
Original entry on oeis.org
25, 100, 400, 1600, 6400, 25600, 102400, 409600, 1638400, 6553600, 26214400, 104857600, 419430400, 1677721600, 6710886400, 26843545600, 107374182400, 429496729600, 1717986918400, 6871947673600, 27487790694400, 109951162777600, 439804651110400, 1759218604441600
Offset: 1
25 = 5^2 = 3^2 + 4^2,
100 = 10^2 = 6^2 + 8^2,
5^2 * 4^(n-1) = (5 * 2^(n-1))^2 = (3 * 2^(n-1))^2 + (4 * 2^(n-1))^2, but these terms are not the sum of three positive squares.
- H.-P. Baltes, Peter K. J. Draxl, and Eberhard R. Hilf, Quadratsummen und gewisse Randwertprobleme der Mathematischen Physik, Publications of the Small Systems Group Oldenburg, preprint, 1973.
- H.-P. Baltes, Peter K. J. Draxl, and Eberhard R. Hilf, Quadratsummen und gewisse Randwertprobleme der Mathematischen Physik, Journ. Reine Angewandte Mathematik, Vol. 268/269, 1974, 410-417.
- P. K. J. Draxl, Sommes de deux carrés qui ne sont pas sommes de trois carrés., Mémoires de la SMF, tome 37 (1974), p. 53-53.
- Index entries for linear recurrences with constant coefficients, signature (4).
A166265
Numbers of the form 1+x^2+y^2, x, y integers >= 1.
Original entry on oeis.org
3, 6, 9, 11, 14, 18, 19, 21, 26, 27, 30, 33, 35, 38, 41, 42, 46, 51, 53, 54, 59, 62, 66, 69, 73, 74, 75, 81, 83, 86, 90, 91, 98, 99, 101, 102, 105, 107, 110, 114, 117, 118, 123, 126, 129, 131, 137, 138, 146, 147, 149, 150, 154, 158, 161, 163, 165, 170, 171, 174, 179, 181, 182
Offset: 1
-
With[{nn=40},Take[Union[Total/@Tuples[Range[nn]^2,2]+1],2*nn]] (* Harvey P. Dale, Mar 12 2015 *)
Original entry on oeis.org
0, 1, 3, 7, 12, 20, 29, 39, 52, 68, 85, 103, 123, 148, 174, 203, 235, 269, 305, 342, 382, 423, 468, 517, 567, 619, 672, 730, 791, 855, 920, 988, 1060, 1133, 1207, 1287, 1368, 1450, 1535, 1624, 1714, 1811, 1909, 2009, 2110, 2214, 2320, 2429, 2542, 2658, 2775
Offset: 1
a(66) = 0 + 1 + 2 + 4 + 5 + 8 + 9 + 10 + 13 + 16 + 17 + 18 + 20 + 25 + 26 + 29 + 32 + 34 + 36 + 37 + 40 + 41 + 45 + 49 + 50 + 52 + 53 + 58 + 61 + 64 + 65 + 68 + 72 + 73 + 74 + 80 + 81 + 82 + 85 + 89 + 90 + 97 + 98 + 100 + 101 + 104 + 106 + 109 + 113 + 116 + 117 + 121 + 122 + 125 + 128 + 130 + 136 + 137 + 144 + 145 + 146 + 148 + 149 + 153 + 157 + 160 = 4876.
Cf.
A001481,
A022544,
A004018,
A000161,
A002654,
A064533,
A000404,
A002828,
A000378,
A025284-
A025320,
A125110,
A091072.
-
N:= 1000:
A001481:= sort(convert({seq(seq(x^2+y^2, y=0..floor(sqrt(N-x^2))),x=0..floor(sqrt(N)))},list)):
ListTools:-PartialSums(A001481); # Robert Israel, Mar 15 2016
-
from itertools import count, accumulate, islice
from sympy import factorint
def A173256_gen(): # generator of terms
return accumulate(filter(lambda n:all(p & 3 != 3 or e & 1 == 0 for p, e in factorint(n).items()),count(0)))
A173256_list = list(islice(A173256_gen(),30)) # Chai Wah Wu, Jun 27 2022
A294713
Numbers that are the sum of three squares (square 0 allowed) in exactly ten ways.
Original entry on oeis.org
594, 626, 629, 734, 846, 914, 926, 929, 1001, 1026, 1041, 1097, 1125, 1190, 1193, 1209, 1214, 1229, 1241, 1265, 1289, 1326, 1329, 1382, 1386, 1409, 1433, 1490, 1505, 1509, 1521, 1530, 1581, 1637, 1689, 1691, 1713, 1725, 1730, 1739, 1749, 1754, 1770, 1778
Offset: 1
Cf.
A000164,
A005875,
A000378,
A094942,
A224442,
A224443,
A294577,
A294594,
A294595,
A294710,
A294711,
A294712.
-
Select[Range[0, 1000], Length[PowersRepresentations[#, 3, 2]] == 10 &]
Updated Mathematica program to Version 11. by
Robert Price, Nov 01 2019
A302359
Numbers that are the sum of 3 squares > 1.
Original entry on oeis.org
12, 17, 22, 24, 27, 29, 33, 34, 36, 38, 41, 43, 44, 45, 48, 49, 50, 54, 56, 57, 59, 61, 62, 65, 66, 67, 68, 69, 70, 72, 74, 75, 76, 77, 78, 81, 82, 83, 84, 86, 88, 89, 90, 93, 94, 96, 97, 98, 99, 101, 102, 104, 105, 106, 107, 108, 109, 110, 113, 114, 115, 116, 117, 118, 120, 121, 122, 123, 125, 126, 129
Offset: 1
33 is in the sequence because 33 = 2^2 + 2^2 + 5^2.
-
max = 130; f[x_] := Sum[x^(k^2), {k, 2, 20}]^3; Exponent[#, x] & /@ List @@ Normal[Series[f[x], {x, 0, max}]]
With[{nn=15},Select[Union[Total/@Tuples[Range[2,nn]^2,3]],#<=nn^2+8&]] (* Harvey P. Dale, Jul 05 2021 *)
-
from itertools import count, takewhile, combinations_with_replacement as mc
def aupto(N):
sqrs = list(takewhile(lambda x: x<=N, (i**2 for i in count(2))))
sum3 = set(sum(c) for c in mc(sqrs, 3) if sum(c) <= N)
return sorted(sum3)
print(aupto(129)) # Michael S. Branicky, Dec 17 2021
A347360
Numbers that can be represented as the sum of squares of 3 numbers and also equal to twice the sum of their joint products.
Original entry on oeis.org
18, 72, 98, 162, 288, 338, 392, 450, 648, 722, 882, 1152, 1352, 1458, 1568, 1800, 1922, 2178, 2450, 2592, 2738, 2888, 3042, 3528, 3698, 4050, 4608, 4802, 5202, 5408, 5832, 6272, 6498, 7200, 7442, 7688, 7938, 8450, 8712, 8978, 9522, 9800, 10368, 10658, 10952, 11250, 11552, 11858
Offset: 1
For example, the third term (1,4,9) is 1^2+4^2+9^2 = 2*(1*4+1*9+4*9) = 98.
The sequence is given by
a(n) (x, y, z)
18 (1,1,4)
72 (2,2,8)
98 (1,4,9)
162 (3,3,12)
288 (4,4,16)
338 (1,9,16)
392 (2,8,18)
450 (5,5,20)
648 (6,6,24)
722 (4,9,25)
882 (1,16,25) (3,12,27) (7,7,28)
1152 (8,8,32) (2,18,32)
1352 (2,18,32)
1458 (9,9,36)
1568 (4,16,36)
1800 (10,10,40)
1922 (1,25,36)
2178 (11,11,44)
2450 (5,20,45)
2592 (12,12,48)
2738 (9,16,49)
2888 (8,18,50)
3042 (3,27,48) (4,25,49) (13,13,52)
3528 (2,32,50) (6,24,54)
- E. Grosswald, Representations of Integers as Sums of Squares, Springer-Verlag, NY, 1985.
-
q[n_] := (s = Select[PowersRepresentations[n,3,2], AllTrue[#, #1 > 0 &]&]) != {} && MemberQ[(#[[1]]*#[[2]] + #[[2]]*#[[3]] + #[[3]]*#[[1]])& /@ s, n/2]; Select[Range[2, 12000, 2], q] (* Amiram Eldar, Oct 03 2021 *)
Comments