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.

User: Lorraine Lee

Lorraine Lee's wiki page.

Lorraine Lee has authored 2 sequences.

A387220 Arithmetic mean of number of lattice points strictly inside circle of radius n centered on origin, and number of points not outside that circle.

Original entry on oeis.org

3, 11, 27, 47, 75, 111, 147, 195, 251, 311, 375, 439, 523, 611, 703, 795, 895, 1007, 1127, 1251, 1371, 1515, 1651, 1791, 1951, 2115, 2287, 2451, 2623, 2815, 2999, 3207, 3407, 3619, 3847, 4051, 4287, 4511, 4771, 5019, 5255, 5523, 5787, 6075, 6355, 6623, 6919, 7211
Offset: 1

Author

Lorraine Lee, Aug 22 2025

Keywords

Comments

a(n) is the number of integer values (x, y) strictly inside the circle x^2+y^2=n^2, plus half the number of such lattice points that are part of the perimeter of that circle.
All terms are odd. - Chai Wah Wu, Aug 23 2025

Examples

			The unit circle has 1 lattice point strictly inside it and 5 lattice points not outside it. Halfway between 1 and 5 is 3, so a(1) = 3.
		

Crossrefs

Average of A051132 and A000328.

Programs

  • PARI
    a(n) = {4*n -1 + 2*sum(k=1, n-1, my(t=n^2-k^2); 2*sqrtint(t)-issquare(t))} \\ Andrew Howroyd, Aug 22 2025
    
  • Python
    from math import isqrt
    def A387220(n): return 1+(sum(isqrt(m:=k*((n<<1)-k))+isqrt(m-1) for k in range(1,n+1))<<1) # Chai Wah Wu, Aug 23 2025

Formula

a(n) = (A051132(n) + A000328(n))/2.
a(n) = A256465(n^2). - R. J. Mathar, Aug 26 2025

A306385 a(n) is the maximum number of distinct distances possible between points in a hyperrectangular grid the sum of whose dimensions is n.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 9, 12, 15, 18, 23, 28, 33, 40, 47, 56, 65, 74, 85, 98, 111, 127, 145, 163, 181, 199, 217, 238, 261, 284, 309, 338, 368, 398, 428, 458, 488, 518, 555, 592, 631, 673, 715, 757, 804, 852, 900, 948, 997, 1052, 1107, 1163, 1222, 1281, 1340, 1407, 1474, 1541, 1608, 1675
Offset: 1

Author

Lorraine Lee, Feb 20 2019

Keywords

Programs

  • PARI
    b(v)={prod(k=1, #v, sum(i=0, v[k]-1, x^(i^2)))}
    c(v)={sum(i=1, #v, v[i]<>0)}
    a(n)={my(m=1); if(n>1, forpart(p=n, m=max(m, c(Vec(b(p)))), [2,n])); m} \\ Andrew Howroyd, Aug 11 2024

Extensions

a(44)-a(45) from Lorraine Lee, Aug 11 2024
a(46) onwards from Andrew Howroyd, Aug 11 2024