login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A242118 Number of unit squares that intersect the circumference of a circle of radius n centered at (0,0). 9
0, 4, 12, 20, 28, 28, 44, 52, 60, 68, 68, 84, 92, 92, 108, 108, 124, 124, 140, 148, 148, 164, 172, 180, 188, 180, 196, 212, 220, 220, 228, 244, 252, 260, 260, 268, 284, 284, 300, 300, 308, 316, 332, 340, 348, 348, 364, 372, 380, 388, 380 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

COMMENTS

For the points that form the Pythagorean triple (for example see illustration n = 5, on the first quadrant at coordinate (4,3) and (3,4)), the transit of circumference occurs exactly at the corners, therefore there are no additional intersecting squares on the upper or lower rows (diagonally NE & SW directions) of such points. When the center of the circle is chosen at the middle of a square grid centered at (1/2,0), the sequence will be 2*A004767(n-1).

LINKS

Table of n, a(n) for n=0..50.

Kival Ngaokrajang, Illustration of initial terms

FORMULA

a(n) = 4*Sum{k=1..n} ceiling(sqrt(n^2 - (k-1)^2)) - floor(sqrt(n^2 - k^2)). - Orson R. L. Peters, Jan 30 2017

a(n) = 8*n - A046109(n) for n > 0. - conjectured by Orson R. L. Peters, Jan 30 2017, proved by Andrey Zabolotskiy, Jan 31 2017

PROG

(Python)

a = lambda n: sum(4 for x in range(n) for y in range(n)

                    if x**2 + y**2 < n**2 and (x+1)**2 + (y+1)**2 > n**2)

(Python)

from sympy import factorint

def a(n):

    r = 1

    for p, e in factorint(n).items():

        if p%4 == 1: r *= 2*e + 1

    return 8*n - 4*r if n > 0 else 0

CROSSREFS

Cf. A009003, A004767.

Sequence in context: A285526 A321466 A227226 * A030387 A269931 A043437

Adjacent sequences:  A242115 A242116 A242117 * A242119 A242120 A242121

KEYWORD

nonn

AUTHOR

Kival Ngaokrajang, May 05 2014

EXTENSIONS

Terms corrected by Orson R. L. Peters, Jan 30 2017

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 3 05:29 EDT 2020. Contains 334798 sequences. (Running on oeis4.)