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.

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.

This page as a plain text file.
%I A387220 #19 Aug 26 2025 05:24:20
%S A387220 3,11,27,47,75,111,147,195,251,311,375,439,523,611,703,795,895,1007,
%T A387220 1127,1251,1371,1515,1651,1791,1951,2115,2287,2451,2623,2815,2999,
%U A387220 3207,3407,3619,3847,4051,4287,4511,4771,5019,5255,5523,5787,6075,6355,6623,6919,7211
%N 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.
%C A387220 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.
%C A387220 All terms are odd. - _Chai Wah Wu_, Aug 23 2025
%F A387220 a(n) = (A051132(n) + A000328(n))/2.
%F A387220 a(n) = A256465(n^2). - _R. J. Mathar_, Aug 26 2025
%e A387220 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.
%o A387220 (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
%o A387220 (Python)
%o A387220 from math import isqrt
%o A387220 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
%Y A387220 Average of A051132 and A000328.
%K A387220 nonn,new
%O A387220 1,1
%A A387220 _Lorraine Lee_, Aug 22 2025