A211422 Number of ordered triples (w,x,y) with all terms in {-n,...,0,...,n} and w^2 + x*y = 0.
1, 9, 17, 25, 41, 49, 57, 65, 81, 105, 113, 121, 137, 145, 153, 161, 193, 201, 225, 233, 249, 257, 265, 273, 289, 329, 337, 361, 377, 385, 393, 401, 433, 441, 449, 457, 505, 513, 521, 529, 545, 553, 561, 569, 585, 609, 617, 625, 657, 713, 753, 761
Offset: 0
Keywords
A063691 Number of solutions to x^2 + y^2 + z^2 = n in positive integers.
0, 0, 0, 1, 0, 0, 3, 0, 0, 3, 0, 3, 1, 0, 6, 0, 0, 3, 3, 3, 0, 6, 3, 0, 3, 0, 6, 4, 0, 6, 6, 0, 0, 6, 3, 6, 3, 0, 9, 0, 0, 9, 6, 3, 3, 6, 6, 0, 1, 6, 6, 6, 0, 6, 12, 0, 6, 6, 0, 9, 0, 6, 12, 0, 0, 6, 12, 3, 3, 12, 6, 0, 3, 3, 12, 7, 3, 12, 6, 0, 0, 12, 3, 9, 6, 0, 15, 0, 3, 15
Offset: 0
Examples
a(5)=0; a(6)=3 because 1^2+1^2+2^2 = 1^2+2^2+1^2 = 2^2+1^2+1^2 = 6; a(27)=4 because 1^2+1^2+5^2 = 1^2+5^2+1^2 = 3^2+3^2+3^2 = 5^2+1^2+1^2 = 27.
Links
- T. D. Noe, Table of n, a(n) for n = 0..10000
Crossrefs
Programs
-
Mathematica
r[n_] := Reduce[ x>0 && y>0 && z>0 && x^2 + y^2 + z^2 == n, {x, y, z}, Integers]; a[n_] := Which[rn = r[n]; rn === False, 0, Head[rn] === Or, Length[rn], True, 1]; Table[a[n], {n, 0, 89}](* Jean-François Alcover, May 10 2012 *) (EllipticTheta[3, 0, x] - 1)^3/8 + O[x]^100 // CoefficientList[#, x]& (* Jean-François Alcover, Jul 30 2017 *)
Formula
G.f.: (Sum_{m>=1} x^(m^2))^3.
A253663 Number of positive solutions to x^2+y^2+z^2 <= n^2.
0, 0, 1, 7, 17, 38, 78, 127, 196, 296, 410, 564, 738, 958, 1220, 1514, 1848, 2235, 2686, 3175, 3719, 4365, 5007, 5758, 6568, 7442, 8415, 9477, 10597, 11779, 13100, 14459, 15954, 17566, 19231, 21029, 22916, 24930, 27030, 29293, 31616, 34103, 36732, 39459
Offset: 0
Keywords
Comments
Whereas A000604 counts solutions where x>=0, y>=0, z>=0, this sequence counts solutions where x>0, y>0, z>0.
Examples
a(4)=17 counts the following solutions (x,y,z): (1,1,1), (2,2,2), three permutations of (1,1,2), three permutations of (1,1,3), three permutations of (1,2,2), and six permutations of (1,2,3).
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..1000
Crossrefs
Cf. A000604.
Programs
-
Sage
[len([(x,y,z) for x in [1..n] for y in [1..n] for z in [1..n] if x^2+y^2+z^2<=n^2]) for n in [0..43]] # Tom Edgar, Jan 07 2015
Formula
a(n) = A211639(n^2).
a(n) = [x^(n^2)] (theta_3(x) - 1)^3/(8*(1 - x)), where theta_3() is the Jacobi theta function. - Ilya Gutkovskiy, Apr 17 2018
Comment from N. J. A. Sloane, Jun 02 2024 (Start)
The one-dimensional lattice {n: n an integer} , which graphically looks like
...o o o o o o ...
has theta series 1 + 2 q + 2 q^4 + 2 q^9 + 2 q^16 + ... = sum {n=-oo..oo} q^(n^2),
and that power series is called theta_3(q), A000122.
Raising it to the power 3 counts points with x^2+y^2+z^2 = k, A005875.
Dividing it by 1-x gives the partial sums, which basically is what this sequence is.
So a first approximation to a theta series for the sequence is theta_3(q)^8/(1-q).
Subtracting 1 and dividing by 8 is because here we only want positive solutions.
(End)
A211638 Number of ordered triples (w, x, y) with all terms in {1, ..., n} and w^2 + x^2 + y^2 < n.
0, 0, 0, 0, 1, 1, 1, 4, 4, 4, 7, 7, 10, 11, 11, 17, 17, 17, 20, 23, 26, 26, 32, 35, 35, 38, 38, 44, 48, 48, 54, 60, 60, 60, 66, 69, 75, 78, 78, 87, 87, 87, 96, 102, 105, 108, 114, 120, 120, 121, 127, 133, 139, 139, 145, 157, 157, 163, 169, 169, 178, 178, 184
Offset: 0
Keywords
Comments
For a guide to related sequences, see A211422.
Links
- David A. Corneth, Table of n, a(n) for n = 0..10000
Crossrefs
Cf. A211422.
Programs
-
Mathematica
t = Compile[{{n, _Integer}}, Module[{s = 0}, (Do[If[w^2 + x^2 + y^2 < n, s = s + 1], {w, 1, #}, {x, 1, #}, {y, 1, #}] &[n]; s)]]; Map[t[#] &, Range[0, 80]] (* A211638 *) (* Peter J. C. Moses, Apr 13 2012 *)
-
PARI
first(n) = {n = max(n, 2); n-=2; my(res = vector(n), v = vector(n)); forvec(x = vector(3, i, [1,sqrtint(n)]), c = sum(i = 1, 3, x[i]^2); if(c <= n, v[c]++)); for(i = 2, #v, v[i]+=v[i-1]); concat([0,0],v)} \\ David A. Corneth, Jun 16 2023
Formula
a(n) = A211639(n-1). - R. J. Mathar, Jun 16 2023
A211643 Number of ordered triples (w,x,y) with all terms in {1,...,n} and w^2+x^2+y^2<=2n.
0, 0, 1, 4, 4, 7, 11, 17, 17, 23, 26, 35, 38, 44, 48, 60, 60, 69, 78, 87, 87, 102, 108, 120, 121, 133, 139, 157, 163, 169, 178, 196, 196, 214, 220, 238, 241, 256, 266, 284, 284, 299, 314, 329, 332, 359, 365, 383, 386, 401, 410, 434, 440, 458, 471, 495
Offset: 0
Keywords
Crossrefs
Cf. A211422.
Programs
-
Mathematica
t = Compile[{{n, _Integer}}, Module[{s = 0}, (Do[If[w^2 + x^2 + y^2 <= 2 n, s = s + 1], {w, 1, #}, {x, 1, #}, {y, 1, #}] &[n]; s)]]; Map[t[#] &, Range[0, 80]] (* A211643 *) (* Peter J. C. Moses, Apr 13 2012 *)
A372512 Number of solutions to x^2 + y^2 + z^2 <= n, where x, y, z are positive odd integers.
0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 7, 7, 7, 7, 7, 7, 7, 7, 11, 11, 11, 11, 11, 11, 11, 11, 17, 17, 17, 17, 17, 17, 17, 17, 20, 20, 20, 20, 20, 20, 20, 20, 26, 26, 26, 26, 26, 26, 26, 26, 35, 35, 35, 35, 35, 35, 35, 35, 38, 38, 38, 38, 38, 38, 38, 38, 45, 45, 45, 45, 45, 45
Offset: 0
Keywords
Programs
-
Mathematica
nmax = 80; CoefficientList[Series[EllipticTheta[2, 0, x^4]^3/(8 (1 - x)), {x, 0, nmax}], x]
Comments
Examples
Links
Crossrefs
Programs
Mathematica