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.

A036698 a(n) is the number of Gaussian integers z=a+bi satisfying |z|<=n, a>0, b>=0.

This page as a plain text file.
%I A036698 #31 Dec 20 2021 10:02:43
%S A036698 0,1,3,7,12,20,28,37,49,63,79,94,110,132,153,177,199,225,252,282,314,
%T A036698 343,379,413,448,490,530,572,613,657,705,750,802,852,906,963,1013,
%U A036698 1073,1128,1194,1256,1315,1381,1447,1519,1590,1656
%N A036698 a(n) is the number of Gaussian integers z=a+bi satisfying |z|<=n, a>0, b>=0.
%H A036698 Seiichi Manyama, <a href="/A036698/b036698.txt">Table of n, a(n) for n = 0..1000</a>
%H A036698 <a href="/index/Ga#gaussians">Index entries for Gaussian integers and primes</a>
%F A036698 a(n) = A000603(n) - n - 1.
%F A036698 a(n) = n^2 * Pi/4 + O(n). - _Charles R Greathouse IV_, Apr 03 2013
%F A036698 a(n) = A014200(n^2). - _Seiichi Manyama_, Dec 20 2021
%o A036698 (C)
%o A036698 typedef unsigned long ulong;
%o A036698 ulong A036698(ulong i)
%o A036698 {
%o A036698     const ulong ring = i*i;
%o A036698     ulong result = 0;
%o A036698     for(ulong a = 1; a <= i; a++)
%o A036698     {
%o A036698         const ulong a2 = a*a;
%o A036698         for(ulong b = 0; b <= i; b++)
%o A036698         {
%o A036698             ulong z = a2 + b*b;
%o A036698             if ( ring >= z ) result++;
%o A036698         }
%o A036698     }
%o A036698     return result;
%o A036698 } /* _Oskar Wieland_, Apr 02 2013 */
%o A036698 (PARI) a(n)=my(n2=n^2);sum(a=1,n,sqrtint(n2-a^2)+1) \\ _Charles R Greathouse IV_, Apr 03 2013
%o A036698 (PARI) a(n) = sum(k=1, n^2, sumdiv(k, d, kronecker(-4, k/d))); \\ _Seiichi Manyama_, Dec 20 2021
%Y A036698 Cf. A000603, A014200.
%K A036698 nonn
%O A036698 0,3
%A A036698 _Clark Kimberling_