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.

A372511 Number of solutions to x^2 + y^2 <= n, where x, y are positive odd integers.

Original entry on oeis.org

0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 6, 6, 6, 6, 6, 6, 6, 6, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 11, 11, 11, 11, 11, 11, 11, 11, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 15, 15, 15, 15, 15, 15, 15, 15, 17, 17, 17, 17
Offset: 0

Views

Author

Ilya Gutkovskiy, May 04 2024

Keywords

Crossrefs

Programs

  • Mathematica
    nmax = 85; CoefficientList[Series[EllipticTheta[2, 0, x^4]^2/(4 (1 - x)), {x, 0, nmax}], x]

A374532 Number of complete unit squares that fit inside a circle of radius sqrt(n^2+1) centered at the origin of a square lattice.

Original entry on oeis.org

0, 4, 12, 24, 40, 68, 96, 132, 180, 224, 284, 340, 408, 492, 564, 656, 740, 848, 960, 1060, 1184, 1304, 1444, 1576, 1704, 1868, 2024, 2196, 2356, 2520, 2716, 2892, 3104, 3292, 3504, 3720, 3916, 4160, 4384, 4628, 4872, 5108, 5372, 5640, 5916, 6188, 6456, 6764, 7036
Offset: 0

Views

Author

Thomas Otten, Jul 10 2024

Keywords

Crossrefs

Cf. A119677 (case for radius of n), A237526.
Cf. A046092, A000328 (quadrant width 1 cell).

Programs

  • PARI
    a(n) = my(s=n^2+1); 4*sum(k=1, sqrtint(s), sqrtint(s-k^2)) \\ Andrew Howroyd, Jul 11 2024
    
  • Python
    def A374532(n): return sum(isqrt(k*((n<<1)-k)+1) for k in range(n))<<2 # Chai Wah Wu, Jul 18 2024

Formula

a(n) = 4*A237526(n^2 + 1).
Showing 1-2 of 2 results.