cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Previous Showing 21-30 of 45 results. Next

A302861 a(n) = [x^(n^2)] theta_3(x)^n/(1 - x), where theta_3() is the Jacobi theta function.

Original entry on oeis.org

1, 3, 13, 123, 1281, 16875, 252673, 4031123, 70554353, 1318315075, 26107328109, 549772933959, 12147113355505, 280978137279483, 6780378828922333, 169829490474843659, 4409771551548703649, 118361723203178140163, 3277041835527134201777, 93455465161026267454527
Offset: 0

Views

Author

Ilya Gutkovskiy, Apr 14 2018

Keywords

Comments

a(n) = number of integer lattice points inside the n-dimensional hypersphere of radius n.

Crossrefs

Programs

  • Mathematica
    Table[SeriesCoefficient[EllipticTheta[3, 0, x]^n/(1 - x), {x, 0, n^2}], {n, 0, 19}]
    Table[SeriesCoefficient[1/(1 - x) Sum[x^k^2, {k, -n, n}]^n, {x, 0, n^2}], {n, 0, 19}]

Formula

a(n) = A122510(n,n^2).

A303644 a(n) is the number of lattice points in a Cartesian grid between a square of side length 2*n, centered at the origin, and its inscribed circle. The sides of the square are parallel to the coordinate axes.

Original entry on oeis.org

0, 0, 0, 4, 4, 12, 24, 32, 40, 48, 68, 92, 100, 120, 136, 168, 192, 220, 244, 268, 312, 336, 376, 420, 444, 484, 524, 576, 624, 664, 724, 764, 820, 868, 912, 992, 1040, 1116, 1156, 1220, 1304, 1368, 1440, 1496, 1564, 1660, 1732, 1816, 1888, 1960, 2032, 2116, 2220, 2308
Offset: 1

Views

Author

Kirill Ustyantsev, Apr 27 2018

Keywords

Comments

The borders of the square and the circle are not included. Rotating the square by 45 degrees (so that its vertices lie on the coordinate axes) results in sequence A303646 instead.

Examples

			For n = 4, we have 4 points with integer coordinates; the point in the first quadrant is at (3,3):
.
                    o . . + . . o
                    . . . + . . .
                    . . . + . . .
                   -+-+-+-+-+-+-+-
                    . . . + . . .
                    . . . + . . .
                    o . . + . . o
.
Similarly, for n = 5, we have 4 points with integer coordinates; the point in the first quadrant is at (4,4):
.
                  o . . . + . . . o
                  . . . . + . . . .
                  . . . . + . . . .
                  . . . . + . . . .
                 -+-+-+-+-+-+-+-+-+-
                  . . . . + . . . .
                  . . . . + . . . .
                  . . . . + . . . .
                  o . . . + . . . o
.
For n = 6, we have 12 points, of which the 3 points in the first quadrant are at (4,5), (5,4), and (5,5):
.
                o o . . . + . . . o o
                o . . . . + . . . . o
                . . . . . + . . . . .
                . . . . . + . . . . .
                . . . . . + . . . . .
               -+-+-+-+-+-+-+-+-+-+-+-
                . . . . . + . . . . .
                . . . . . + . . . . .
                . . . . . + . . . . .
                o . . . . + . . . . o
                o o . . . + . . . o o
		

Crossrefs

Programs

  • PARI
    a(n) = sum(x=-n+1, n-1, sum(y=-n+1, n-1, (x^2+y^2) > n^2)); \\ Michel Marcus, May 22 2018
  • Python
    import math
    for n in range(1, 100):
        count = 0
        for x in range(1, n):
            for y in range(1, n):
                if x * x + y * y > n * n and x < n and y < n:
                    count = count + 1
        print(4 * count, end=", ")
    

Formula

a(n) = A016754(n-1) - A000328(n) - 4.

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

Views

Author

Keywords

Comments

Number of ordered pairs of integers (x,y) with x^2 + y^2 <= n^2 and y >= 0. [Reinhard Zumkeller, Jan 23 2012]

Crossrefs

Programs

  • Haskell
    a036695 n = length [(x,y) | x <- [-n..n], y <- [0..n], x^2 + y^2 <= n^2]
    -- Reinhard Zumkeller, Jan 23 2012
  • Mathematica
    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 *)

Formula

Partial sums of A036696. - Sean A. Irvine, Nov 22 2020

A047077 Number of pairs of integers (x,y) with n^2 <= x^2+y^2 <= (n+1)^2.

Original entry on oeis.org

5, 12, 20, 24, 36, 44, 40, 52, 60, 68, 72, 68, 92, 96, 100, 100, 108, 120, 124, 132, 128, 148, 140, 144, 172, 180, 180, 168, 180, 204, 192, 212, 204, 220, 240, 212, 244, 232, 268, 260, 248, 276, 268, 292, 288, 276, 300, 296, 316, 324, 348, 336, 324, 348, 336
Offset: 0

Views

Author

Klaus Strassburger (strass(AT)ddfi.uni-duesseldorf.de), Jan 26 2000

Keywords

Comments

Number of integer Cartesian grid points covered by a ring around the origin with width 1 and outer radius n. Also, number of Gaussian integers z=a+bi satisfying n-1 <= |z| <= n. - Ralf Stephan, Nov 28 2013

Crossrefs

Programs

  • Mathematica
    a[n_] := Sum[SquaresR[2, k], {k, n^2, (n+1)^2}]; Table[a[n], {n, 0, 54}] (* Jean-François Alcover, Oct 15 2012 *)

Formula

a(n) = A000328(n+1) - A051132(n).

A175341 Number of coprime pairs (x,y) with x^2+y^2 <= n^2.

Original entry on oeis.org

0, 4, 8, 16, 32, 48, 72, 88, 120, 152, 192, 224, 264, 312, 384, 440, 480, 544, 616, 672, 768, 832, 928, 1000, 1112, 1192, 1280, 1384, 1488, 1584, 1704, 1816, 1960, 2072, 2224, 2344, 2480, 2600, 2752, 2912, 3064, 3184, 3360, 3480, 3696, 3856, 4016, 4176
Offset: 0

Views

Author

R. J. Mathar, Apr 16 2010

Keywords

Examples

			a(2) = 8 counts (x,y) = (-1,-1), (-1,0), (-1,1), (0,-1), (0,1), (1,-1), (1,0) and (1,1).
		

Crossrefs

Programs

  • Mathematica
    a89[n_] := a89[n] = Product[{p, e} = pe; Which[p < 3 && e == 1, 1, p == 2 && e > 1, 0, Mod[p, 4] == 1, 2, Mod[p, 4] == 3, 0, True, a89[p^e]], {pe, FactorInteger[n]}];
    b[n_] := b[n] = If[n == 0, 0, b[n-1] + 4 a89[n]];
    a[n_] := b[n^2];
    Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Aug 02 2023 *)

Formula

a(n) = 4*A176562(n). - R. J. Mathar, May 07 2010
a(n) = A304651(n^2). - Seiichi Manyama, May 26 2018

A292276 a(n) = number of vertices of the convex hull of the set of points of norm <= n^2 in square lattice.

Original entry on oeis.org

1, 4, 4, 8, 12, 12, 12, 12, 20, 12, 20, 20, 20, 20, 20, 20, 20, 24, 28, 20, 20, 20, 36, 36, 28, 20, 36, 36, 36, 36, 28, 36, 36, 36, 44, 36, 36, 36, 36, 52, 44, 36, 36, 36, 52, 44, 52, 52, 44, 52, 44, 60, 52, 44, 52, 44, 52, 52, 52, 52, 60, 52, 52, 52, 68, 44
Offset: 0

Views

Author

Rémy Sigrist, Sep 13 2017

Keywords

Comments

The convex hull of a finite point set in dimension 2, say S, forms a convex polygon whose vertices are in S.
For any n >= 0, A000328(n) gives the number of elements of the set of points of norm <= n^2 in square lattice.
For symmetry reasons, a(n) is a multiple of 4 for any n > 0.

Examples

			See Links section.
		

Crossrefs

A295344 Maximum number of lattice points inside and on a circle of radius n.

Original entry on oeis.org

1, 5, 14, 32, 52, 81, 116, 157, 208, 258, 319, 384, 457, 540, 623, 716, 812, 914, 1025, 1142, 1268, 1396, 1528, 1669, 1816, 1976, 2131, 2300, 2472, 2650, 2836, 3028, 3228, 3436, 3644, 3859, 4080, 4314, 4548, 4792, 5038, 5289, 5555, 5818, 6092, 6376, 6668, 6952
Offset: 0

Views

Author

Arkadiusz Wesolowski, Nov 20 2017

Keywords

Comments

Maximum number of lattice points (i.e., points with integer coordinates) in the plane that can be covered by a circle of radius n.
a(n) >= A000328(n).
Conjecture: sequence contains infinitely many terms that are divisible by 4.

Examples

			For a circle centered at the point (x, y) = (1/2, 1/4) with radius 2, there are 14 lattice points inside and on the circle.
.
.     Center             # Pts in/
.    x      y    Radius  on circle
.  -----  -----  ------  ---------
.    0      0       1         5
.   1/2    1/4      2        14
.   1/2    1/2      3        32
.   1/2    1/2      4        52
.    0      0       5        81
.   1/2    1/3      6       116
.   2/5    1/5      7       157
.   1/2    1/2      8       208
.   1/2    2/9      9       258
.  20/47  19/56    10       319
.   1/2    1/2     11       384
.  11/23   7/20    12       457
.   1/2    1/2     13       540
.  10/21   3/13    14       623
.   1/2    1/2     15       716
.   1/2    1/2     16       812
.   2/5    2/5     17       914
.   3/8    5/14    18      1025
.   1/2    1/6     19      1142
.   9/19   8/17    20      1268
		

References

  • B. R. Srinivasan, Lattice Points in a Circle, Proc. Nat. Inst. Sci. India, Part A, 29 (1963), pp. 332-346.

Crossrefs

Programs

  • PARI
    L=List([]); for(n=0, 47, if(n>0, j=5, j=1); g=0; h=0; f=ceil(Pi*n^2); for(d=2, floor(f/2), for(c=1, floor(d/2), if(gcd(c, d)==1, for(e=d, d+1, if(e/f<=1/2, a=c/d; b=e/f; if(a+b>=1/2, t=0; for(x=-n, n+1, for(y=-n, n+1, z=(a-x)^2+(b-y)^2; if(z<=n^2,t++))); if(t>j, j=t; if(a>=b, g=a; h=b, g=b; h=a)))))))); print("a("n") = "j", the center of the circle is at point ("g", "h")."); listput(L, j)); print(); print(Vec(L));

Formula

a(n) = Pi*n^2 + O(n), as n goes to infinity.
a(n) = A123690(2*n) for n >= 1.

Extensions

a(10) corrected by Giovanni Resta, Nov 24 2017

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

Views

Author

Ilya Gutkovskiy, Nov 23 2021

Keywords

Examples

			a(4) = 3 since there are solutions (1,1), (3,1), (1,3).
		

Crossrefs

Programs

  • Mathematica
    Table[SeriesCoefficient[EllipticTheta[2, 0, x^4]^2/(4 (1 - x)), {x, 0, n^2}], {n, 0, 55}]

Formula

a(n) = [x^(n^2)] theta_2(x^4)^2 / (4 * (1 - x)).
a(n) = Sum_{k=0..n^2} A290081(k).
a(n) = A053415(n) / 4.

A357576 Half area of the convex hull of {(x,y)| x,y integers and x^2 + y^2 < n^2}.

Original entry on oeis.org

0, 2, 8, 17, 28, 46, 63, 87, 112, 142, 173, 204, 244, 287, 333, 378, 428, 485, 540, 602, 661, 737, 802, 869, 947, 1030, 1118, 1197, 1278, 1378, 1469, 1575, 1670, 1776, 1889, 1990, 2108, 2219, 2353, 2472, 2587, 2723, 2854, 3002, 3135, 3275, 3424, 3563, 3721
Offset: 1

Views

Author

Gerhard Kirchner, Oct 05 2022

Keywords

Comments

a(n) is odd if there is an edge connecting two vertices (x,y) and (y,x), x > y > 0, such that x-y is odd. Otherwise, a(n) is even. a(n)/n^2 is not monotonous but tends to Pi/2. The convex hull has four symmetry axes: x=0, y=0, y=x, y=-x. Therefore it is sufficient to find the least area of a quarter polygon (multiplied by 2). The half area is an integer because the area of any convex polygon whose vertex coordinates are integers is a multiple of 1/2.

Examples

			For n=4: 5+6+6 = 17 square units -> a(4)=17.
     _______
   /|_|_|_|_|\  5
  |_|_|_|_|_|_| 6
  |_|_|_|_|_|_| 6
		

Crossrefs

Programs

  • Maxima
    block(nmax: 40, a: makelist(0,i,1,nmax), a[1]:0,
    for n from 2 thru nmax do
      (x0:0, y0:n, xa:0, ya:n, m1:0, m0:2, ar:0,
        while xa
    				
  • Python
    from math import isqrt
    from sympy import convex_hull
    def A357576(n): return 0 if n == 1 else int(2*convex_hull(*[(0,0),(n-1,0)]+[(x,isqrt((n-x)*(n+x)-1)) for x in range(n)]).area) # Chai Wah Wu, Oct 23 2022

Formula

a(n) = A357575(n) - 2*floor(sqrt(2*n-1)) if n is a nonhypotenuse number (A004144).

A036693 Number of Gaussian integers z = a + bi satisfying n-1 < |z| <= n.

Original entry on oeis.org

1, 4, 8, 16, 20, 32, 32, 36, 48, 56, 64, 60, 64, 88, 84, 96, 88, 104, 108, 120, 128, 116, 144, 136, 140, 168, 160, 168, 164, 176, 192, 180, 208, 200, 216, 228, 200, 240, 220, 264, 248, 236, 264, 264, 288, 284, 264, 296, 292, 312
Offset: 0

Views

Author

Keywords

Examples

			a(10^2) = 660, a(10^3) = 6392, a(10^4) = 62952, a(10^5) = 628520, a(10^6) = 6281404. - _Reinhard Zumkeller_, Jan 13 2002
		

Crossrefs

Cf. A000328.

Programs

  • Magma
    [#[: x in [-n..n], y in [-n..n]| n-1 lt r and r  le n where r is Sqrt(x^2+ y^2)]: n in [0..50]]; // Marius A. Burtea, Feb 18 2020
    
  • Sage
    def A036693(n):
        if n == 0: return 1
        Range = lambda n: ((i, j) for i in (-n..n) for j in (-n..n))
        return sum(1 for (j, k) in Range(n) if (n-1)^2 < j^2 + k^2 <= n^2)
    print([A036693(n) for n in range(20)]) # Peter Luschny, Mar 27 2020

Formula

From Reinhard Zumkeller, Jan 13 2002: (Start)
a(n)/n ~ 2*Pi.
a(n) = A000328(n)-A000328(n-1). (End)
Previous Showing 21-30 of 45 results. Next