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.
%I A234334 #23 May 28 2023 03:14:15 %S A234334 0,1,5,8,25,40,45,65,80,153,160,169,200,221,325,360,416,425,493,520, %T A234334 625,680,725,925,936,1025,1040,1073,1088,1305,1360,1681,1768,1800, %U A234334 1813,1845,1961,2000,2320,2385,2501,2600,2925,3016,3185,3200,3400,3445,3721,3848 %N A234334 Numbers k such that both distances from k to two nearest squares are perfect squares. %C A234334 Except a(1)=0, a(n) are numbers k such that both k-x and y-k are perfect squares, where x and y are two nearest to k squares: x < k <= y. %C A234334 The sequence of sums of distances begins: 1, 1, 5, 5, 9, 13, 13, 17, 17, 25, 25, 25, 29, 29, 37, 37, 41, 41, 45, 45, 49, 53, 53, 61, 61, 65, 65, 65, 65, 73, 73, 81, 85, ... (cf. A057653). %C A234334 Each term is either a square or has a pair: if i^2 + j^2 = 2*m+1 then m^2+i^2 and m^2+j^2 are both in the sequence. %H A234334 Robert Israel, <a href="/A234334/b234334.txt">Table of n, a(n) for n = 1..6000</a> %e A234334 The two squares nearest to 25 are 16 and 25, because both 25-25=0 and 25-16=9 are squares, 25 is in the sequence. %e A234334 The two squares nearest to 45 are 36 and 49, because both 45-36=9 and 49-45=4 are squares, 45 is in the sequence. %p A234334 filter:= proc(n) local a; %p A234334 if issqr(n) then a:= sqrt(n)-1 else a:= floor(sqrt(n)) fi; %p A234334 issqr(n-a^2) and issqr((a+1)^2-n) %p A234334 end proc: %p A234334 select(filter, [$0..5000]); # _Robert Israel_, Jan 21 2021 %t A234334 filter[n_] := If[n == 0, True, Module[{a}, a = If[IntegerQ @ Sqrt[n], Sqrt[n]-1, Floor[Sqrt[n]]]; IntegerQ @ Sqrt[n-a^2] && IntegerQ@Sqrt[(a+1)^2-n]]]; %t A234334 Select[Range[0, 5000], filter] (* _Jean-François Alcover_, May 28 2023, after _Robert Israel_ *) %Y A234334 Cf. A000290. %Y A234334 Cf. subsequences: A007204, A234335, A234336. %Y A234334 Cf. A234348. %K A234334 nonn,easy %O A234334 1,3 %A A234334 _Alex Ratushnyak_, Dec 23 2013