A093836
Numerator of A000328(n)/n^2, where A000328(n) is the number of lattice points (x,y) with x^2 + y^2 <= n^2.
Original entry on oeis.org
5, 13, 29, 49, 81, 113, 149, 197, 253, 317, 377, 49, 529, 613, 709, 797, 53, 1009, 1129, 1257, 1373, 1517, 1653, 1793, 1961, 2121, 763, 2453, 2629, 2821, 3001, 3209, 3409, 3625, 3853, 1351, 4293, 4513, 4777, 201, 5261, 5525, 5789, 6077, 6361, 6625
Offset: 1
-
N:= 100: # to get a(1) to a(N)
B:= Array(1..N);
for i from 0 to N do
for j from i while i^2 + j^2 <= N^2 do
v:= ceil(sqrt(i^2+j^2));
if [i,j] = [0,0] then m:= 1; v:= 1
elif i=0 or i=j then m:= 4
else m:= 8
fi;
B[v]:= B[v]+m;
od
od:
A000328:= ListTools:-PartialSums(convert(B,list)):
seq(numer(A000328[n]/n^2),n=1..N); # Robert Israel, May 28 2015
A381018
a(n) is the number of primes in A000328 for r <= n.
Original entry on oeis.org
1, 2, 3, 3, 3, 4, 5, 6, 6, 7, 7, 7, 7, 8, 9, 10, 10, 11, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 15, 15, 15, 16, 16, 16, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 21, 21, 21, 22, 22, 22, 22, 22, 22, 23, 23, 23
Offset: 1
-
a(n) = sum(k=0, n, isprime(1 + 4*sum(j=0, k^2\4, k^2\(4*j+1) - k^2\(4*j+3))));
-
from math import isqrt
from sympy import isprime
def A381018(n): return sum(1 for m in range(1,n+1) if isprime(1+(sum(isqrt(k*((m<<1)-k)) for k in range(1,m+1))<<2))) # Chai Wah Wu, Feb 13 2025
Original entry on oeis.org
5, 13, 29, 113, 149, 197, 317, 613, 709, 797, 1009, 1129, 1373, 3001, 3209, 3853, 4513, 5261, 6361, 7213, 11681, 12853, 15373, 16729, 19577, 20593, 21101, 22133, 25997, 30757, 33317, 38669, 53077, 56401, 65101, 68777, 72533, 73517, 95093, 100621, 108637, 114553, 115781, 118213
Offset: 1
-
N:= 200: # for terms in A000328(1..N)
V:= Array(0..N): V[0]:= 1:
for x from 1 to N do
for y from 0 to x do
if y = 0 or y = x then m:= 4 else m:= 8 fi;
s:= ceil(sqrt(x^2+y^2));
if s > N then break fi;
V[s]:= V[s] + m
od od:
select(isprime, ListTools:-PartialSums(convert(V,list))); # Robert Israel, May 27 2025
-
select(isprime, vector(200, n, 1 + 4*sum(j=0, n^2\4, n^2\(4*j+1) - n^2\(4*j+3))))
A046109
Number of lattice points (x,y) on the circumference of a circle of radius n with center at (0,0).
Original entry on oeis.org
1, 4, 4, 4, 4, 12, 4, 4, 4, 4, 12, 4, 4, 12, 4, 12, 4, 12, 4, 4, 12, 4, 4, 4, 4, 20, 12, 4, 4, 12, 12, 4, 4, 4, 12, 12, 4, 12, 4, 12, 12, 12, 4, 4, 4, 12, 4, 4, 4, 4, 20, 12, 12, 12, 4, 12, 4, 4, 12, 4, 12, 12, 4, 4, 4, 36, 4, 4, 12, 4, 12, 4, 4, 12, 12, 20, 4, 4, 12, 4, 12, 4, 12, 4, 4, 36
Offset: 0
a(5) = 12 because the circumference of the circle with radius 5 will pass through the twelve points (5, 0), (4, 3), (3, 4), (0, 5), (-3, 4), (-4, 3), (-5, 0), (-4, -3), (-3, -4), (0, -5), (3, -4) and (4, -3). Alternatively, we can say the twelve Gaussian integers 5, 4 + 3i, ... , 4 - 3i all have absolute value of 5.
-
a046109 n = length [(x,y) | x <- [-n..n], y <- [-n..n], x^2 + y^2 == n^2]
-- Reinhard Zumkeller, Jan 23 2012
-
N:= 1000: # to get a(0) to a(N)
A:= Array(0..N):
A[0]:= 1:
for x from 1 to N do
A[x]:= A[x]+4;
for y from 1 to min(x-1,floor(sqrt(N^2-x^2))) do
z:= x^2+y^2;
if issqr(z) then
t:= sqrt(z);
A[t]:= A[t]+8;
fi
od
od:
seq(A[i],i=0..N); # Robert Israel, May 08 2015
-
Table[Length[Select[Flatten[Table[r + I i, {r, -n, n}, {i, -n, n}]], Abs[#] == n &]], {n, 0, 49}] (* Alonso del Arte, Feb 11 2012 *)
-
a(n)=if(n==0, return(1)); my(f=factor(n)); 4*prod(i=1,#f~, if(f[i,1]%4==1, 2*f[i,2]+1, 1)) \\ Charles R Greathouse IV, Feb 01 2017
-
a(n)=if(n==0, return(1)); t=0; for(x=1, n-1, y=n^2-x^2; if(issquare(y), t++)); return(4*t+4) \\ Arkadiusz Wesolowski, Nov 14 2017
-
from sympy import factorint
def a(n):
r = 1
for p, e in factorint(n).items():
if p%4 == 1: r *= 2*e + 1
return 4*r if n > 0 else 0
# Orson R. L. Peters, Jan 31 2017
A057655
The circle problem: number of points (x,y) in square lattice with x^2 + y^2 <= n.
Original entry on oeis.org
1, 5, 9, 9, 13, 21, 21, 21, 25, 29, 37, 37, 37, 45, 45, 45, 49, 57, 61, 61, 69, 69, 69, 69, 69, 81, 89, 89, 89, 97, 97, 97, 101, 101, 109, 109, 113, 121, 121, 121, 129, 137, 137, 137, 137, 145, 145, 145, 145, 149, 161, 161, 169, 177, 177, 177
Offset: 0
a(0) = 1 (counting origin).
a(1) = 5 since 4 points lie on the circle of radius sqrt(1) + origin.
a(2) = 9 since 4 lattice points lie on the circle w/radius = sqrt(2) (along diagonals) + 4 points inside the circle + origin. - _Wesley Ivan Hurt_, Jan 10 2013
- C. Alsina and R. B. Nelsen, Charming Proofs: A Journey Into Elegant Mathematics, Math. Assoc. Amer., 2010, p. 42.
- J. H. Conway and N. J. A. Sloane, "Sphere Packings, Lattices and Groups", Springer-Verlag, p. 106.
- F. Fricker, Einfuehrung in die Gitterpunktlehre, Birkhäuser, Boston, 1982.
- P. de la Harpe, Topics in Geometric Group Theory, Univ. Chicago Press, 2000, p. 5.
- E. Kraetzel, Lattice Points, Kluwer, Dordrecht, 1988.
- C. D. Olds, A. Lax and G. P. Davidoff, The Geometry of Numbers, Math. Assoc. Amer., 2000, p. 51.
- W. Sierpiński, Elementary Theory of Numbers, Elsevier, North-Holland, 1988.
- James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, pages 245-246.
Cf.
A038589 (for hexagonal lattice).
-
a057655 n = length [(x,y) | x <- [-n..n], y <- [-n..n], x^2 + y^2 <= n]
-- Reinhard Zumkeller, Jan 23 2012
-
N:= 1000: # to get a(0) to a(N)
R:= Array(0..N):
for a from 0 to floor(sqrt(N)) do
for b from 0 to floor(sqrt(N-a^2)) do
r:= a^2 + b^2;
R[r]:= R[r] + (2 - charfcn[0](a))*(2 - charfcn[0](b));
od
od:
convert(map(round,Statistics:-CumulativeSum(R)),list); # Robert Israel, Sep 29 2014
-
f[n_] := 1 + 4Sum[ Floor@ Sqrt[n - k^2], {k, 0, Sqrt[n]}]; Table[ f[n], {n, 0, 60}] (* Robert G. Wilson v, Jun 16 2006 *)
Accumulate[ SquaresR[2, Range[0, 55]]] (* Jean-François Alcover, Feb 24 2012 *)
CoefficientList[Series[EllipticTheta[3,0,x]^2/(1-x), {x, 0, 100}], x] (* Vaclav Kotesovec, Sep 29 2014 after Robert Israel *)
-
a(n)=sum(x=-n,n,sum(y=-n,n,if((sign(x^2+y^2-n)+1)*sign(x^2+y^2-n),0,1)))
-
a(n)=1+4*sum(k=0,sqrtint(n), sqrtint(n-k^2) ); /* Benoit Cloitre, Oct 08 2012 */
-
from math import isqrt
def A057655(n): return 1+(sum(isqrt(n-k**2) for k in range(isqrt(n)+1))<<2) # Chai Wah Wu, Jul 31 2023
A302997
Square array A(n,k), n >= 0, k >= 0, read by antidiagonals: A(n,k) = [x^(n^2)] theta_3(x)^k/(1 - x), where theta_3() is the Jacobi theta function.
Original entry on oeis.org
1, 1, 1, 1, 3, 1, 1, 5, 5, 1, 1, 7, 13, 7, 1, 1, 9, 33, 29, 9, 1, 1, 11, 89, 123, 49, 11, 1, 1, 13, 221, 425, 257, 81, 13, 1, 1, 15, 485, 1343, 1281, 515, 113, 15, 1, 1, 17, 953, 4197, 5913, 3121, 925, 149, 17, 1, 1, 19, 1713, 12435, 23793, 16875, 6577, 1419, 197, 19, 1, 1, 21, 2869, 33809, 88273, 84769, 42205, 11833, 2109, 253, 21, 1
Offset: 0
Square array begins:
1, 1, 1, 1, 1, 1, ...
1, 3, 5, 7, 9, 11, ...
1, 5, 13, 33, 89, 221, ...
1, 7, 29, 123, 425, 1343, ...
1, 9, 49, 257, 1281, 5913, ...
1, 11, 81, 515, 3121, 16875, ...
Columns k=0..10 give
A000012,
A005408,
A000328,
A000605,
A055410,
A055411,
A055412,
A055413,
A055414,
A055415,
A055416.
Rows k=0..10 give
A000012,
A005408,
A055426,
A055427,
A055428,
A055429,
A055430,
A055431,
A055432,
A055433,
A055434.
-
Table[Function[k, SeriesCoefficient[EllipticTheta[3, 0, x]^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, -n, n}]^k, {x, 0, n^2}]][j - n], {j, 0, 11}, {n, 0, j}] // Flatten
-
T(n,k)={if(k==0, 1, polcoef(((1 + 2*sum(j=1, n, x^(j^2)) + O(x*x^(n^2)))^k)/(1-x), n^2))} \\ Andrew Howroyd, Sep 14 2019
A305575
List points (x,y) having integer coordinates, sorted first by radial coordinate r and in case of ties, by polar angle 0 <= phi < 2*Pi in a polar coordinate system. Sequence gives x-coordinates.
Original entry on oeis.org
0, 1, 0, -1, 0, 1, -1, -1, 1, 2, 0, -2, 0, 2, 1, -1, -2, -2, -1, 1, 2, 2, -2, -2, 2, 3, 0, -3, 0, 3, 1, -1, -3, -3, -1, 1, 3, 3, 2, -2, -3, -3, -2, 2, 3, 4, 0, -4, 0, 4, 1, -1, -4, -4, -1, 1, 4, 3, -3, -3, 3, 4, 2, -2, -4, -4, -2, 2, 4, 5, 4, 3, 0, -3, -4, -5, -4, -3, 0, 3, 4, 5, 1, -1
Offset: 0
The first points (listing [polar angle phi,x,y]) are:
r^2
0: [0.0*Pi,0,0];
1: [0.0*Pi,1,0], [0.5*Pi,0,1], [1.0*Pi,-1,0], [1.5*Pi,0,-1];
2: [0.25*Pi,1,1], [0.75*Pi,-1,1], [1.25*Pi,-1,-1], [1.75*Pi,1,-1];
4: [0.0*Pi,2,0], [0.5*Pi,0,2], [1.0*Pi,-2,0], [1.5*Pi,0,-2];
5: [0.148*Pi,2,1], [0.352*Pi,1,2], [0.648*Pi,-1,2], [0.852*Pi,-2,1],
[1.148*Pi,-2,-1], [1.352*Pi,-1,-2], [1.648*Pi,1,-2], [1.852*Pi,2,-1];
8: [0.25*Pi,2,2], [0.75*Pi,-2,2], [1.25*Pi,-2,-2], [1.75*Pi,2,-2].
-
atan2(y,x)=if(x>0,atan(y/x),if(x==0,if(y>0,Pi/2,-Pi/2),if(y>=0,atan(y/x)+Pi,atan(y/x)-Pi)));
angle(x,y)=(atan2(y,x)+2*Pi)%(2*Pi);
{a004018(n) = if( n<1, n==0, 4 * sumdiv( n, d, (d%4==1) - (d%4==3)))};
xyselect=1; \\ change to 2 for A305576
print1(0,", ");for(s=1,25,my(r=a004018(s));if(r>0,my(v=matrix(r,3),w=vector(r),m=sqrtint(s),L=0);for(i=-m,m,my(k=s-i^2,kk);if(k==0,v[L++,1]=i;v[L,2]=0;v[L,3]=angle(i,0),if(issquare(k),kk=sqrtint(k);forstep(j=-kk,kk,kk+kk,v[L++,1]=i;v[L,2]=j;v[L,3]=angle(i,j)))));p=vecsort(v[,3],,1);for(k=1,L,w[k]=v[p[k],xyselect]);for(k=1,L,print1(w[k],", ")))); \\ Hugo Pfoertner, May 12 2019
A305576
List points (x,y) having integer coordinates, sorted first by radial coordinate r and in case of ties, by polar angle 0 <= phi < 2*Pi in a polar coordinate system. Sequence gives y-coordinates.
Original entry on oeis.org
0, 0, 1, 0, -1, 1, 1, -1, -1, 0, 2, 0, -2, 1, 2, 2, 1, -1, -2, -2, -1, 2, 2, -2, -2, 0, 3, 0, -3, 1, 3, 3, 1, -1, -3, -3, -1, 2, 3, 3, 2, -2, -3, -3, -2, 0, 4, 0, -4, 1, 4, 4, 1, -1, -4, -4, -1, 3, 3, -3, -3, 2, 4, 4, 2, -2, -4, -4, -2, 0, 3, 4, 5, 4, 3, 0, -3, -4, -5, -4, -3, 1
Offset: 0
A000603
Number of nonnegative solutions to x^2 + y^2 <= n^2.
Original entry on oeis.org
1, 3, 6, 11, 17, 26, 35, 45, 58, 73, 90, 106, 123, 146, 168, 193, 216, 243, 271, 302, 335, 365, 402, 437, 473, 516, 557, 600, 642, 687, 736, 782, 835, 886, 941, 999, 1050, 1111, 1167, 1234, 1297, 1357, 1424, 1491, 1564, 1636, 1703, 1778, 1852, 1931, 2012, 2095
Offset: 0
- H. Gupta, A Table of Values of N_3(t), Proc. National Institute of Sciences of India, 13 (1947), 35-63.
- 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).
-
a000603 n = length [(x,y) | x <- [0..n], y <- [0..n], x^2 + y^2 <= n^2]
-- Reinhard Zumkeller, Jan 23 2012
-
Table[cnt = 0; Do[If[x^2 + y^2 <= n^2, cnt++], {x, 0, n}, {y, 0, n}]; cnt, {n, 0, 51}] (* T. D. Noe, Apr 02 2013 *)
Table[If[n==1,1,2*Sum[Sum[A255195[[n, n - k + 1]], {k, 1, k}], {k, 1, n}] - Ceiling[(n - 1)/Sqrt[2]]],{n,1,52}] (* Mats Granvik, Feb 19 2015 *)
-
a(n)=my(n2=n^2);sum(a=0,n,sqrtint(n2-a^2)+1) \\ Charles R Greathouse IV, Apr 03 2013
-
from math import isqrt
def A000603(n): return (m:=n<<1)+sum(isqrt(k*(m-k)) for k in range(1,n))+1 # Chai Wah Wu, Jul 18 2024
A051132
Number of ordered pairs of integers (x,y) with x^2+y^2 < n^2.
Original entry on oeis.org
0, 1, 9, 25, 45, 69, 109, 145, 193, 249, 305, 373, 437, 517, 609, 697, 793, 889, 1005, 1125, 1245, 1369, 1513, 1649, 1789, 1941, 2109, 2285, 2449, 2617, 2809, 2997, 3205, 3405, 3613, 3841, 4049, 4281, 4509, 4765, 5013, 5249, 5521, 5785, 6073, 6349, 6621
Offset: 0
Jostein Trondal (jostein.trondal(AT)protech.no)
a(3)=25 from the points of shapes 00 (1), 10 (4), 11 (4), 20 (4), 21 (8), 22 (4).
Changing "<" to "<=" in the definition gives
A000328.
-
a051132 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 - 1}], {n, 0, 46}]
a[0]=0;a[n_]:=4*n-3+4Sum[Ceiling[Sqrt[n^2-i^2]]-1,{i,n-1}];Array[a,47,0] (* Giorgos Kalogeropoulos, May 20 2025 *)
-
from math import isqrt
def A051132(n): return 1+(sum(isqrt(k*((n<<1)-k)-1) for k in range(1,n+1))<<2) if n else 0 # Chai Wah Wu, Feb 12 2025
Showing 1-10 of 45 results.
Comments