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 11-14 of 14 results.

A323624 The diagonal of the order of square grid cells touched by a circle expanding from the middle of a cell.

Original entry on oeis.org

0, 2, 5, 10, 16, 22, 32, 40, 50, 62, 73, 88, 101, 118, 134, 152, 170, 189, 210, 230, 253, 275, 299, 325, 351, 381, 406, 435, 465, 495, 527, 561, 593, 628, 663, 699, 737, 775, 813, 853, 895, 935, 981, 1021, 1068, 1113, 1156, 1205, 1253, 1302, 1352, 1401, 1454, 1502, 1557, 1609, 1664, 1723
Offset: 0

Views

Author

Rok Cestnik, Jan 20 2019

Keywords

Comments

Related to, but not the same as the case with the circle centered at the corner of a cell, see A232499.

Crossrefs

For the grid read by antidiagonals see A323621.
For the first row of the grid see A323622.
For the second row of the grid see A323623.
For the (2,1) diagonal of the grid see A323625.
Cf. A232499.

Programs

  • Python
    N = 12
    from math import sqrt
    # the distance to the edge of each cell
    edges = [[-1 for j in range(N)] for i in range(N)]
    edges[0][0] = 0
    for i in range(1,N):
        edges[i][0] = i-0.5
        edges[0][i] = i-0.5
    for i in range(1,N):
        for j in range(1,N):
            edges[i][j] = sqrt((i-0.5)**2+(j-0.5)**2)
    # the values of the distances
    values = []
    for i in range(N):
        for j in range(N):
            values.append(edges[i][j])
    values = list(set(values))
    values.sort()
    # the cell order
    board = [[-1 for j in range(N)] for i in range(N)]
    count = 0
    for v in values:
        for i in range(N):
            for j in range(N):
                if(edges[i][j] == v):
                    board[i][j] = count
        count += 1
    # print out the sequence
    for i in range(N):
        print(str(board[i][i])+",", end="")

A323625 The (2,1) diagonal of the order of square grid cells touched by a circle expanding from the middle of a cell.

Original entry on oeis.org

0, 4, 11, 21, 34, 49, 68, 90, 112, 137, 167, 198, 230, 265, 305, 345, 388, 432, 480, 529, 583, 635, 692, 752, 812, 876, 941, 1010, 1079, 1151, 1225, 1305, 1383, 1462, 1545, 1630, 1720, 1811, 1901, 1995, 2092, 2190, 2287, 2391, 2499, 2606, 2715, 2827, 2941, 3056, 3174, 3295, 3421, 3541, 3668, 3792, 3923, 4058, 4193, 4333, 4466, 4609, 4754, 4899, 5042, 5194, 5344, 5498, 5654, 5813, 5972, 6133
Offset: 0

Views

Author

Rok Cestnik, Jan 20 2019

Keywords

Comments

Related to, but not the same as the case with the circle centered at the corner of a cell, see A232499.

Crossrefs

For the grid read by antidiagonals see A323621.
For the first row of the grid see A323622.
For the second row of the grid see A323623.
For the (1,1) diagonal of the grid see A323624.
Cf. A232499.

Programs

  • Python
    N = 24
    from math import sqrt
    # the distance to the edge of each cell
    edges = [[-1 for j in range(N)] for i in range(N)]
    edges[0][0] = 0
    for i in range(1,N):
        edges[i][0] = i-0.5
        edges[0][i] = i-0.5
    for i in range(1,N):
        for j in range(1,N):
            edges[i][j] = sqrt((i-0.5)**2+(j-0.5)**2)
    # the values of the distances
    values = []
    for i in range(N):
        for j in range(N):
            values.append(edges[i][j])
    values = list(set(values))
    values.sort()
    # the cell order
    board = [[-1 for j in range(N)] for i in range(N)]
    count = 0
    for v in values:
        for i in range(N):
            for j in range(N):
                if(edges[i][j] == v):
                    board[i][j] = count
        count += 1
    # print out the sequence
    for i in range(int(round(N/2))):
        print(str(board[2*i][i])+" ", end="")

A237526 a(n) = number of unit squares in the first quadrant of a disk of radius sqrt(n) centered at the origin of a square lattice.

Original entry on oeis.org

0, 0, 1, 1, 1, 3, 3, 3, 4, 4, 6, 6, 6, 8, 8, 8, 8, 10, 11, 11, 13, 13, 13, 13, 13, 15, 17, 17, 17, 19, 19, 19, 20, 20, 22, 22, 22, 24, 24, 24, 26, 28, 28, 28, 28, 30, 30, 30, 30, 30, 33, 33, 35, 37, 37, 37, 37, 37, 39, 39, 39, 41, 41, 41, 41, 45, 45, 45, 47, 47
Offset: 0

Views

Author

L. Edson Jeffery, Feb 09 2014

Keywords

Crossrefs

Partial sums of A063725.

Programs

  • Mathematica
    a[n_]:=Sum[Floor[Sqrt[n-k^2]],{k,Floor[Sqrt[n]]}]; Array[a,70,0] (* Stefano Spezia, Jul 19 2024 *)
  • PARI
    A237526(n)=sum(k=1,sqrtint(n),sqrtint(n-k^2)) \\ M. F. Hasler, Feb 09 2014
    
  • Python
    from math import isqrt
    def A237526(n): return sum(isqrt(n-k**2) for k in range(1,isqrt(n)+1)) # Chai Wah Wu, Jul 18 2024

Formula

a(A000404(n)) = A232499(n).
a(n) = Sum_{k=1..floor(sqrt(n))} floor(sqrt(n-k^2)). - M. F. Hasler, Feb 09 2014
G.f.: (theta_3(x) - 1)^2/(4*(1 - x)), where theta_3() is the Jacobi theta function. - Ilya Gutkovskiy, Apr 17 2018
For n > 1, Pi*(n+2-sqrt(8n)) < a(n) < Pi*n. (This is trivial and can probably be improved by methods like Euler-Maclaurin and perhaps even a modification of the Dirichlet hyperbola method.) - Charles R Greathouse IV, Jul 17 2024

A229904 Number of additional unit squares completely encircled in the first quadrant of a Cartesian grid by a circle centered at the origin as the radius squared increases from one sum of two square integers to the next larger sum of two square integers.

Original entry on oeis.org

1, 2, 1, 2, 2, 2, 1, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 4, 2, 1, 2, 2, 2, 2, 4, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 1, 4, 2, 2, 4, 2, 2, 2, 2, 2, 2, 1, 2, 2, 4, 2, 2, 2, 2
Offset: 1

Views

Author

Rajan Murthy and Vale Murthy, Dec 19 2013

Keywords

Comments

From Mohammed Yaseen, Apr 23 2025: (Start)
a(n) is the number of solutions to x^2 + y^2 = A000404(n), x,y,z >= 1.
a(n) are the degeneracies of the energy levels of a particle in a two-dimensional box in quantum mechanics. See A014465 for the three-dimensional box case. (End)

Examples

			When the radius increases from 0 to sqrt(2), one square is completely encircled (a(1)).  When the radius increases from sqrt(2) to sqrt(3), two more squares are encircled (a(2)).  When the radius increases from sqrt(45) to sqrt(50), three more squares are encircled(a(18)).
		

Crossrefs

First differences of A232499.
Radii are the square roots of A000404.
The first differences must be odd at positions given in A024517 by proof by symmetry as r^2=2*n^2 is on the x=y line.

Formula

a(n) = A232499(n) - A232499(n-1) for n>1, a(1) = A232499(1).
Previous Showing 11-14 of 14 results.