OFFSET
1,10
COMMENTS
A rational point (x,y) is of the form (a/c, b/d) with (a,b,c,d) integers. Sequence gives the number of quadruples (a,b,c,d) satisfying a >= b >= 1, 1 <= c <= n, 1 <= d <= n and such that a^2/c^2 + b^2/d^2 = 1.
PROG
(PARI) a(n)=sum(a=1, n, sum(b=1, a, sum(c=1, n, sum(d=1, n, if(a^2/c^2+b^2/d^2-1, 0, 1)))))
(Python)
def A350459(n): return sum(1 for d in range(1, n+1) for c in range(1, n+1) for b in range(1, d+1) for a in range(1, b+1) if (a*d)**2 + (b*c)**2 == (c*d)**2) # Chai Wah Wu, Jan 19 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Jan 01 2022
STATUS
approved