Problem 53079. Easy Sequences 50: Blocked Gaussian Integers

A Gaussian Integer is a complex number whose real and imaginary parts are both integers.
A gaussian integer is said to be blocked with respect to another gaussian integer z, if the line segment connecting z and on the complex plane, pass through at least one more gaussian integer. In the figure below, where , the red colored points represents the blocked gaussian integers with respect to z, While the green points represents unblocked gaussian integers.
In the above figure, blocked gaussian points, , and , are shown. These points lie within the a square with side lengths , in which is at the center. But these are not the only blocked gaussian points for this case. and are also blocked points. The sum total of all blocked gaussian integers relative to and bounded by the square with side and is .
Given a gaussian integer z, centered at a square of side a, find the absolute value of the sum of all blocked gaussian integers around z, with respect to z, that lies within the square (including, any blocked gaussian points along the edges of the square). Therefore, in the example above, your program should output: .
Please round-off your answer to 4 decimal places.

Solution Stats

100.0% Correct | 0.0% Incorrect
Last Solution submitted on Aug 20, 2023

Problem Comments

Solution Comments

Show comments

Problem Recent Solvers3

Suggested Problems

More from this Author116

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!