login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Number of positive rational points on the unit circle with denominator <= n and numerator >= 1.
1

%I #25 Jan 19 2022 14:33:15

%S 0,0,0,0,1,1,1,1,1,4,4,4,5,5,10,10,11,11,11,19,19,19,19,19,29,32,32,

%T 32,33,44,44,44,44,47,60,60,61,61,66,82,83,83,83,83,100,100,100,100,

%U 100,122,127,134,135,135,156,156,156,159,159,183,184,184,184,184,220,220,220,227,227,254

%N Number of positive rational points on the unit circle with denominator <= n and numerator >= 1.

%C 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.

%o (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)))))

%o (Python)

%o 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

%Y Cf. A046109.

%K nonn

%O 1,10

%A _Benoit Cloitre_, Jan 01 2022