A000328
Number of points of norm <= n^2 in square lattice.
Original entry on oeis.org
1, 5, 13, 29, 49, 81, 113, 149, 197, 253, 317, 377, 441, 529, 613, 709, 797, 901, 1009, 1129, 1257, 1373, 1517, 1653, 1793, 1961, 2121, 2289, 2453, 2629, 2821, 3001, 3209, 3409, 3625, 3853, 4053, 4293, 4513, 4777, 5025, 5261, 5525, 5789, 6077, 6361, 6625
Offset: 0
- J. H. Conway and N. J. A. Sloane, "Sphere Packings, Lattices and Groups", Springer-Verlag, p. 106.
- H. Gupta, A Table of Values of N_3(t), Proc. National Institute of Sciences of India, 13 (1947), 35-63.
- C. D. Olds, A. Lax and G. P. Davidoff, The Geometry of Numbers, Math. Assoc. Amer., 2000, p. 47.
- N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
- T. D. Noe and Robert Israel, Table of n, a(n) for n = 0..10000 (n=0..1000 from T. D. Noe)
- W. Fraser and C. C. Gotlieb, A calculation of the number of lattice points in the circle and sphere, Math. Comp., 16 (1962), 282-290.
- Eric Weisstein's World of Mathematics, Gauss's Circle Problem
- Jianqiang Zhao, The Largest Circle Enclosing n Lattice Points, arXiv:2505.06234 [math.GM], 2025. See Table 3 p. 18.
-
a000328 n = length [(x,y) | x <- [-n..n], y <- [-n..n], x^2 + y^2 <= n^2]
-- Reinhard Zumkeller, Jan 23 2012
-
Table[Sum[SquaresR[2, k], {k, 0, n^2}], {n, 0, 46}]
-
{ a(n) = 1 + 4 * sum(j=0,n^2\4, n^2\(4*j+1) - n^2\(4*j+3) ) } /* Max Alekseyev, Nov 18 2007 */
-
def A000328(n):
return (sum([int((n**2 - y**2)**0.5) for y in range(1, n)]) * 4 + 4*n + 1)
# Karl-Heinz Hofmann, Aug 03 2022
-
from math import isqrt
def A000328(n): return 1+(sum(isqrt(k*((n<<1)-k)) for k in range(1,n+1))<<2) # Chai Wah Wu, Feb 12 2025
A302998
Square array A(n,k), n >= 0, k >= 0, read by antidiagonals: A(n,k) = [x^(n^2)] (1 + theta_3(x))^k/(2^k*(1 - x)), where theta_3() is the Jacobi theta function.
Original entry on oeis.org
1, 1, 1, 1, 2, 1, 1, 3, 3, 1, 1, 4, 6, 4, 1, 1, 5, 11, 11, 5, 1, 1, 6, 20, 29, 17, 6, 1, 1, 7, 36, 70, 54, 26, 7, 1, 1, 8, 63, 157, 165, 99, 35, 8, 1, 1, 9, 106, 337, 482, 357, 163, 45, 9, 1, 1, 10, 171, 702, 1319, 1203, 688, 239, 58, 10, 1, 1, 11, 265, 1420, 3390, 3819, 2673, 1154, 344, 73, 11, 1
Offset: 0
Square array begins:
1, 1, 1, 1, 1, 1, ...
1, 2, 3, 4, 5, 6, ...
1, 3, 6, 11, 20, 36, ...
1, 4, 11, 29, 70, 157, ...
1, 5, 17, 54, 165, 482, ...
1, 6, 26, 99, 357, 1203, ...
Columns k=0..10 give
A000012,
A000027,
A000603,
A000604,
A055403,
A055404,
A055405,
A055406,
A055407,
A055408,
A055409.
Rows n=0..10 give
A000012,
A000027,
A055417,
A055418,
A055419,
A055420,
A055421,
A055422,
A055423,
A055424,
A055425.
-
Table[Function[k, SeriesCoefficient[(1 + EllipticTheta[3, 0, x])^k/(2^k (1 - x)), {x, 0, n^2}]][j - n], {j, 0, 11}, {n, 0, j}] // Flatten
Table[Function[k, SeriesCoefficient[1/(1 - x) Sum[x^i^2, {i, 0, n}]^k, {x, 0, n^2}]][j - n], {j, 0, 11}, {n, 0, j}] // Flatten
-
T(n,k)={if(k==0, 1, polcoef(((sum(j=0, n, x^(j^2)) + O(x*x^(n^2)))^k)/(1-x), n^2))} \\ Andrew Howroyd, Sep 14 2019
A048149
Array T read by diagonals: T(i,j) = number of pairs (h,k) with h^2+k^2 <= i^2+j^2, h>=0, k >= 0.
Original entry on oeis.org
1, 3, 3, 6, 4, 6, 11, 8, 8, 11, 17, 13, 9, 13, 17, 26, 19, 15, 15, 19, 26, 35, 28, 22, 20, 22, 28, 35, 45, 37, 30, 26, 26, 30, 37, 45, 58, 48, 39, 33, 31, 33, 39, 48, 58, 73, 62, 52, 43, 41, 41, 43, 52, 62, 73, 90, 75, 64, 54, 50, 48, 50, 54, 64, 75, 90
Offset: 0
Seen as a triangle:
[0] 1;
[1] 3, 3;
[2] 6, 4, 6;
[3] 11, 8, 8, 11;
[4] 17, 13, 9, 13, 17;
[5] 26, 19, 15, 15, 19, 26;
[6] 35, 28, 22, 20, 22, 28, 35;
[7] 45, 37, 30, 26, 26, 30, 37, 45;
[8] 58, 48, 39, 33, 31, 33, 39, 48, 58;
[9] 73, 62, 52, 43, 41, 41, 43, 52, 62, 73;
-
A048149 := proc(n, k) option remember; ## n = 0 .. infinity and k = 0 .. n
local x, y, radius, nTotal;
if n >= k then
radius := floor(sqrt(n^2 + k^2));
nTotal := 0;
for x from 0 to radius do
nTotal := nTotal + floor(sqrt(n^2 + k^2 - x^2)) + 1;
end do;
return nTotal;
else
return A048149(k, n);
end if;
end proc: # Yu-Sheng Chang, Jan 14 2020
-
t[i_, j_] := Module[{h, k}, Reduce[h^2 + k^2 <= i^2 + j^2 && h >= 0 && k >= 0, {h, k}, Integers] // ToRules // Length[{##}]&]; Table[t[n-k, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Jean-François Alcover, Nov 26 2013 *)
A036702
a(n)=number of Gaussian integers z=a+bi satisfying |z|<=n, a>=0, 0<=b<=a.
Original entry on oeis.org
1, 2, 4, 7, 10, 15, 20, 25, 32, 40, 49, 57, 66, 78, 89, 102, 114, 128, 142, 158, 175, 190, 209, 227, 245, 267, 288, 310, 331, 354, 379, 402, 429, 455, 483, 512, 538, 569, 597, 631, 663, 693, 727, 761, 798, 834, 868, 906, 943, 983
Offset: 0
-
A036702 := proc(n)
local a,x,y ;
a := 0 ;
for x from 0 do
if x^2 > n^2 then
return a;
fi ;
for y from 0 to x do
if y^2+x^2 <= n^2 then
a := a+1 ;
end if;
end do;
end do:
end proc: # R. J. Mathar, Oct 29 2011
-
a[n_] := Module[{a, b}, If[n == 0, 1, Reduce[a^2 + b^2 <= n^2 && a >= 0 && 0 <= b <= a, {a, b}, Integers] // Length]];
a /@ Range[0, 49] (* Jean-François Alcover, Oct 17 2019 *)
A228233
Number of Gaussian primes of norm less than or equal to n in the first quadrant.
Original entry on oeis.org
0, 1, 5, 7, 9, 11, 17, 21, 23, 27, 35, 37, 41, 47, 49, 55, 63, 69, 77, 83, 91, 97, 103, 109, 119, 127, 133, 143, 151, 159, 169, 179, 187, 199, 209, 219, 227, 237, 245, 251, 265, 279, 287, 301, 311, 323, 335, 351, 367, 377, 385, 401, 419, 431, 441, 455, 469
Offset: 1
Cf.
A000603 (number of Gaussian integers in the first quadrant with norm less than or equal to n).
Cf.
A062711 (counts the Gaussian primes on only one axis).
Cf.
A228232 (this sequence excluding classical primes and pure imaginary primes).
Cf.
A002145 (Gaussian primes that are positive integers).
-
nn = 100; t = Select[Flatten[Table[a + b*I, {a, 0, nn}, {b, 0, nn}]], PrimeQ[#, GaussianIntegers -> True] &]; t2 = Table[0, {nn}]; Do[f = Ceiling[Abs[i]]; If[f <= nn, t2[[f]]++], {i, t}]; Accumulate[t2] (* T. D. Noe, Aug 19 2013 *)
A255195
Triangle describing the shape of one eighth of the Gauss circle problem.
Original entry on oeis.org
1, 2, 0, 2, 1, 0, 2, 1, 1, 0, 2, 1, 2, 0, 0, 2, 1, 1, 2, 0, 0, 2, 1, 1, 2, 1, 0, 0, 2, 1, 1, 2, 2, 0, 0, 0, 2, 1, 1, 2, 1, 2, 0, 0, 0, 2, 1, 1, 1, 2, 2, 1, 0, 0, 0, 2, 1, 1, 1, 2, 1, 2, 1, 0, 0, 0, 2, 1, 1, 1, 2, 1, 2, 2, 0, 0, 0, 0, 2, 1, 1, 1, 2, 1, 2, 2, 1, 0, 0, 0, 0
Offset: 1
1,
2, 0,
2, 1, 0,
2, 1, 1, 0,
2, 1, 2, 0, 0,
2, 1, 1, 2, 0, 0,
2, 1, 1, 2, 1, 0, 0,
2, 1, 1, 2, 2, 0, 0, 0,
2, 1, 1, 2, 1, 2, 0, 0, 0,
2, 1, 1, 1, 2, 2, 1, 0, 0, 0,
2, 1, 1, 1, 2, 1, 2, 1, 0, 0, 0,
2, 1, 1, 1, 2, 1, 2, 2, 0, 0, 0, 0,
2, 1, 1, 1, 2, 1, 2, 2, 1, 0, 0, 0, 0
-
Flatten[Table[Sum[Table[If[And[If[n^2 + k^2 <= r^2, If[n >= k, 1, 0], 0] == 1, If[(n + 1)^2 + (k + 1)^2 <= r^2, If[n >= k, 1, 0], 0]== 0], 1, 0], {k, 0, r}], {n, 0, r}], {r, 0, 12}]]
A255238
Triangle T(n, m) of numbers of points of a square lattice covered by a circular disk of radius n (centered at any lattice point taken as origin) with ordinate y = m in the first quadrant.
Original entry on oeis.org
1, 2, 1, 3, 2, 1, 4, 3, 3, 1, 5, 4, 4, 3, 1, 6, 5, 5, 5, 4, 1, 7, 6, 6, 6, 5, 4, 1, 8, 7, 7, 7, 6, 5, 4, 1, 9, 8, 8, 8, 7, 7, 6, 4, 1, 10, 9, 9, 9, 9, 8, 7, 6, 5, 1, 11, 10, 10, 10, 10, 9, 9, 8, 7, 5, 1
Offset: 0
The triangle T(n, m) begins:
n\m 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
0: 1
1: 2 1
2: 3 2 1
3: 4 3 3 1
4: 5 4 4 3 1
5: 6 5 5 5 4 1
6: 7 6 6 6 5 4 1
7: 8 7 7 7 6 5 4 1
8: 9 8 8 8 7 7 6 4 1
9: 10 9 9 9 9 8 7 6 5 1
10: 11 10 10 10 10 9 9 8 7 5 1
11: 12 11 11 11 11 10 10 9 8 7 5 1
12: 13 12 12 12 12 11 11 10 9 8 7 5 1
13: 14 13 13 13 13 13 12 11 11 10 9 7 6 1
14: 15 14 14 14 14 14 13 13 12 11 10 9 8 6 1
15: 16 15 15 15 15 15 14 14 13 13 12 11 10 8 6 1
...
A302863
a(n) = [x^(n^2)] (1 + theta_3(x))^n/(2^n*(1 - x)), where theta_3() is the Jacobi theta function.
Original entry on oeis.org
1, 2, 6, 29, 165, 1203, 9763, 83877, 793049, 7903501, 83570177, 933697153, 10905583809, 133352809334, 1695473999478, 22354920990148, 305096197935075, 4296142551821184, 62336908825014452, 930284705538262688, 14255992611680074754, 224065160215526683317, 3607018540134004189466
Offset: 0
Cf.
A000603,
A000604,
A010052,
A055403,
A055404,
A055405,
A055406,
A055407,
A055408,
A055409,
A298329,
A302861,
A302862.
-
Table[SeriesCoefficient[(1 + EllipticTheta[3, 0, x])^n/(2^n (1 - x)), {x, 0, n^2}], {n, 0, 22}]
Table[SeriesCoefficient[1/(1 - x) Sum[x^k^2, {k, 0, n}]^n, {x, 0, n^2}], {n, 0, 22}]
A036695
a(n)=number of Gaussian integers z=a+bi satisfying |z|<=n, b>=0.
Original entry on oeis.org
1, 4, 9, 18, 29, 46, 63, 82, 107, 136, 169, 200, 233, 278, 321, 370, 415, 468, 523, 584, 649, 708, 781, 850, 921, 1006, 1087, 1172, 1255, 1344, 1441, 1532, 1637, 1738, 1847, 1962, 2063, 2184, 2295, 2428, 2553, 2672, 2805, 2938
Offset: 0
-
a036695 n = length [(x,y) | x <- [-n..n], y <- [0..n], x^2 + y^2 <= n^2]
-- Reinhard Zumkeller, Jan 23 2012
-
a[n_] := (k = 0; Do[If[x^2 + y^2 <= n^2, k++], {x, -n, n}, {y, 0, n}]; k); Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Oct 08 2016 *)
A349609
Number of solutions to x^2 + y^2 <= n^2, where x, y are positive odd integers.
Original entry on oeis.org
0, 0, 1, 1, 3, 4, 8, 8, 13, 15, 20, 22, 28, 31, 39, 43, 52, 54, 64, 69, 79, 83, 96, 102, 112, 121, 135, 140, 154, 162, 179, 185, 203, 212, 228, 238, 255, 265, 281, 296, 316, 326, 349, 359, 382, 394, 416, 429, 451, 469, 494, 508, 532, 547, 573, 587
Offset: 0
a(4) = 3 since there are solutions (1,1), (3,1), (1,3).
-
Table[SeriesCoefficient[EllipticTheta[2, 0, x^4]^2/(4 (1 - x)), {x, 0, n^2}], {n, 0, 55}]
Showing 1-10 of 13 results.
Comments