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.

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

This page as a plain text file.
%I A350459 #25 Jan 19 2022 14:33:15
%S A350459 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 A350459 32,33,44,44,44,44,47,60,60,61,61,66,82,83,83,83,83,100,100,100,100,
%U A350459 100,122,127,134,135,135,156,156,156,159,159,183,184,184,184,184,220,220,220,227,227,254
%N A350459 Number of positive rational points on the unit circle with denominator <= n and numerator >= 1.
%C A350459 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 A350459 (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 A350459 (Python)
%o A350459 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 A350459 Cf. A046109.
%K A350459 nonn
%O A350459 1,10
%A A350459 _Benoit Cloitre_, Jan 01 2022