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.

Showing 1-2 of 2 results.

A001182 Number of cells of square lattice of edge 1/n inside quadrant of unit circle centered at 0.

Original entry on oeis.org

0, 1, 4, 8, 15, 22, 30, 41, 54, 69, 83, 98, 119, 139, 162, 183, 208, 234, 263, 294, 322, 357, 390, 424, 465, 504, 545, 585, 628, 675, 719, 770, 819, 872, 928, 977, 1036, 1090, 1155, 1216, 1274, 1339, 1404, 1475, 1545, 1610, 1683, 1755, 1832, 1911, 1992, 2072
Offset: 1

Views

Author

Tihamer von Ghyczy (ghyczy(AT)esinet.net)

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Sum[Floor@ Sqrt[n^2 - k^2], {k, n - 1}], {n, 52}] (* Michael De Vlieger, Jan 30 2017 *)
  • Python
    from math import isqrt
    def A001182(n): return sum(isqrt(k*((n<<1)-k)) for k in range(1,n)) # Chai Wah Wu, Jul 18 2024

Formula

a(n) = Sum_{k=1..n-1} floor(sqrt(n^2-k^2)). - Horst Kraemer (horst.kraemer(AT)epost.de) Apr 07 2004
a(n) = A261849(2*n)/4 = (A281795(n)-A242118(n))/4. - Andrey Zabolotskiy, Jan 30 2017
a(n) = [x^(n^2)] (theta_3(x) - 1)^2/(4*(1 - x)), where theta_3() is the Jacobi theta function. - Ilya Gutkovskiy, Apr 17 2018

Extensions

More terms from Klaus Strassburger (strass(AT)ddfi.uni-duesseldorf.de), Jan 19 2000

A302829 a(n) is the number of lattice points in a Cartesian grid between a circle of radius n and an inscribed square whose vertices lie on the coordinate axes.

Original entry on oeis.org

0, 0, 4, 8, 12, 28, 36, 52, 72, 88, 112, 128, 156, 192, 220, 252, 280, 324, 368, 408, 448, 504, 548, 592, 644, 708, 776, 828, 880, 952, 1016, 1096, 1164, 1236, 1324, 1388, 1472, 1548, 1648, 1736, 1808, 1912, 2004, 2116, 2212, 2300, 2408, 2508, 2624, 2728, 2860, 2976, 3076
Offset: 1

Views

Author

Kirill Ustyantsev, Apr 27 2018

Keywords

Comments

Points are not lying on the borders of the circle and the square.
Note that if the square is rotated so that its sides are parallel to the coordinate axes, the resulting sequence is A303642 instead.

Crossrefs

Programs

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

Formula

a(n) = A281795(n) - 4*A034856(n). - Andrey Zabolotskiy, Apr 29 2018
Showing 1-2 of 2 results.