login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A036698 a(n) is the number of Gaussian integers z=a+bi satisfying |z|<=n, a>0, b>=0. 1
0, 1, 3, 7, 12, 20, 28, 37, 49, 63, 79, 94, 110, 132, 153, 177, 199, 225, 252, 282, 314, 343, 379, 413, 448, 490, 530, 572, 613, 657, 705, 750, 802, 852, 906, 963, 1013, 1073, 1128, 1194, 1256, 1315, 1381, 1447, 1519, 1590, 1656 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
FORMULA
a(n) = A000603(n) - n - 1.
a(n) = n^2 * Pi/4 + O(n). - Charles R Greathouse IV, Apr 03 2013
a(n) = A014200(n^2). - Seiichi Manyama, Dec 20 2021
PROG
(C)
typedef unsigned long ulong;
ulong A036698(ulong i)
{
const ulong ring = i*i;
ulong result = 0;
for(ulong a = 1; a <= i; a++)
{
const ulong a2 = a*a;
for(ulong b = 0; b <= i; b++)
{
ulong z = a2 + b*b;
if ( ring >= z ) result++;
}
}
return result;
} /* Oskar Wieland, Apr 02 2013 */
(PARI) a(n)=my(n2=n^2); sum(a=1, n, sqrtint(n2-a^2)+1) \\ Charles R Greathouse IV, Apr 03 2013
(PARI) a(n) = sum(k=1, n^2, sumdiv(k, d, kronecker(-4, k/d))); \\ Seiichi Manyama, Dec 20 2021
CROSSREFS
Sequence in context: A172115 A328655 A091369 * A279169 A132273 A130050
KEYWORD
nonn
AUTHOR
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 16 14:17 EDT 2024. Contains 371740 sequences. (Running on oeis4.)