login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A156685 Number of primitive Pythagorean triples A^2 + B^2 = C^2 with 0 < A < B < C and gcd(A,B)=1 that have a hypotenuse C that is less than or equal to n. 3
0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,13
COMMENTS
D. N. Lehmer has proved that the asymptotic density of a(n) is a(n)/n = 1/(2*Pi) = 0.1591549...
REFERENCES
Lehmer, Derrick Norman; Asymptotic Evaluation of Certain Totient Sums, American Journal of Mathematics, Vol. 22, No. 4, (Oct. 1900), pp. 293-335.
LINKS
Ramin Takloo-Bighash, How many Pythagorean triples are there?, A Pythagorean Introduction to Number Theory, Undergraduate Texts in Mathematics, Springer, Cham, 2018, 211-226.
FORMULA
Essentially partial sums of A024362.
EXAMPLE
There is one primitive Pythagorean triple with a hypotenuse less than or equal to 7 -- (3,4,5) -- hence a(7)=1.
G.f. = x^5 + x^6 + x^7 + x^8 + x^9 + x^10 + x^11 + x^12 + 2*x^13 + 2*x^14 + ...
MATHEMATICA
RightTrianglePrimitiveHypotenuses[1]:=0; RightTrianglePrimitiveHypotenuses[n_Integer?Positive]:=Module[{f=Transpose[FactorInteger[n]], a, p, mod1posn}, {p, a}=f; mod1=Select[p, Mod[ #, 4]==1&]; If[Length[a]>Length[mod1], 0, 2^(Length[mod1]-1)]]; RightTrianglePrimitiveHypotenuses[ # ] &/@Range[75]//Accumulate
PROG
(Haskell)
a156685 n = a156685_list !! (n-1)
a156685_list = scanl1 (+) a024362_list -- Reinhard Zumkeller, Dec 02 2012
(PARI) a(n)=sum(a=1, n-2, sum(b=a+1, sqrtint(n^2-a^2), gcd(a, b)==1 && issquare(a^2+b^2))) \\ Charles R Greathouse IV, Apr 29 2013
CROSSREFS
Sequence in context: A324965 A072749 A066490 * A124230 A330780 A090973
KEYWORD
easy,nice,nonn
AUTHOR
Ant King, Feb 17 2009
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 21:09 EDT 2024. Contains 371798 sequences. (Running on oeis4.)