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.

A304035 a(n) is the number of lattice points inside a square bounded by the lines x=-n/sqrt(2), x=n/sqrt(2), y=-n/sqrt(2), y=n/sqrt(2).

This page as a plain text file.
%I A304035 #21 May 22 2025 10:21:48
%S A304035 1,9,25,25,49,81,81,121,169,225,225,289,361,361,441,529,625,625,729,
%T A304035 841,841,961,1089,1089,1225,1369,1521,1521,1681,1849,1849,2025,2209,
%U A304035 2401,2401,2601,2809,2809,3025,3249,3249,3481,3721,3969,3969,4225,4489,4489,4761,5041,5329,5329,5625,5929,5929
%N A304035 a(n) is the number of lattice points inside a square bounded by the lines x=-n/sqrt(2), x=n/sqrt(2), y=-n/sqrt(2), y=n/sqrt(2).
%C A304035 If we calculate the first difference of this sequence and then substitute nonzero numbers as 1, we get exactly A080764.
%C A304035 If we include boundary points of the squares we get same sequence (obviously).
%C A304035 Duplicates appear at 4, 7, 11, 14, 18, 21, 24, 28, 31, 35, 38, 41, 45, 48, 52, 55 (= A083051 ?). - _Robert G. Wilson v_, Jun 20 2018
%F A304035 a(n) = A051132(n) - A303642(n).
%o A304035 (Python)
%o A304035 import math
%o A304035 for n in range (1, 100):
%o A304035  count=0
%o A304035  for x in range (-n, n):
%o A304035   for y in range (-n, n):
%o A304035    if ((2*x*x < n*n) and (2*y*y < n*n)):
%o A304035     count=count+1
%o A304035  print(count)
%o A304035 (PARI) a(n) = sum(x=-n, n, sum(y=-n, n, ((2*x^2 < n^2) && (2*y^2 < n^2)))); \\ _Michel Marcus_, May 22 2018
%Y A304035 Cf. A080764, A049472, A051132, A303642.
%K A304035 nonn
%O A304035 1,2
%A A304035 _Kirill Ustyantsev_, May 05 2018