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.

A384693 a(n) is the number of lattice points (r,s) such that 0 and ((r^2+s^2)*d - r*d^2)/r is a square for some integer d with 0

This page as a plain text file.
%I A384693 #60 Aug 04 2025 23:15:34
%S A384693 0,0,0,0,2,3,3,3,5,7,9,9,13,14,16,21,26,27,29,29,33,35,37,37,42,48,52,
%T A384693 56,62,63,70,70,76,77,81,83,94,95,95,98,108,109,113,113,118,125,127,
%U A384693 127,140,146,156,160,167,168,174,180,187,188,191,191,206,207,208,216,228,234,239,239,247,249,258,258,275,276,280,292
%N A384693 a(n) is the number of lattice points (r,s) such that 0<r,s<=n and ((r^2+s^2)*d - r*d^2)/r is a square for some integer d with 0<d<r.
%C A384693 This sequence gives the number of invisible lattice points along circular arcs surrounded in a n X n square. Visibility is defined for the family (x-t)^2 + y^2 = t^2, for t being a positive rational, this sequence is important in the sense that it proves that density of invisible points goes to 0 and hence density of visible points comes out to be 1.
%F A384693 Define I(r,s) = 1 if there exists an integer d, 1 <= d < r, such that ((r^2 + s^2)*d - r*d^2) / r is a perfect square, and I(r,s) = 0 otherwise.
%F A384693 Let a(0) = 0. For n >= 1, a(n) = a(n-1) + Sum_{s=1..n} I(n,s) + Sum_{r=1..n-1} I(r,n).
%e A384693 For n=4, a(4) = 2 because (2,4) and (4,2) are the only points for which there exists a d (1 for both cases) for which ((2^2+4^2)d-2d^2)/2 is a perfect square for some integer d, 0<d<2 and ((4^2+2^)d-4d^2)/4 is a perfect square for some integer d, 0<d<4.
%e A384693 For n=5, a(5) = 3 because (2,4) and (4,2) are the points already there satisfying the criterion; also, (5,5) is another point because ((5^2+5^2)*1-5*1^2)/5 = 9, which is a perfect square. Hence, a(5)=3.
%o A384693 (Haskell)
%o A384693 isSquare n = (floor . sqrt . fromIntegral $ n) ^ 2 == n
%o A384693 valid a b = not $ null [() | d <- [1..a-1]
%o A384693   , let (q, r) =((a^2 + b^2) * d - a * d^2) `divMod` a
%o A384693   , r == 0
%o A384693   , isSquare q]
%o A384693 count n = length
%o A384693   [ ()
%o A384693   | a <- [1..n]
%o A384693   , b <- [1..n]
%o A384693   , valid a b
%o A384693   ]
%Y A384693 Cf. A033996.
%K A384693 nonn
%O A384693 0,5
%A A384693 _Piyush Kumar Jha_, Jul 23 2025