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.

A328949 Number of non-primitive Pythagorean triples with n as a leg or the hypotenuse.

This page as a plain text file.
%I A328949 #16 Feb 03 2020 20:52:23
%S A328949 0,0,0,0,0,1,0,1,1,2,0,2,0,1,3,2,0,2,0,3,2,1,0,5,2,2,2,2,0,5,0,3,2,2,
%T A328949 3,5,0,1,3,6,0,4,0,2,6,1,0,8,1,4,3,3,0,3,3,5,2,2,0,10,0,1,5,4,4,4,0,3,
%U A328949 2,5,0,10,0,2,7,2,2,5,0,9,3,2,0,9,4,1,3,5,0,8,3,2,2,1,3,11,0,2,5,7
%N A328949 Number of non-primitive Pythagorean triples with n as a leg or the hypotenuse.
%C A328949 Pythagorean triples including primitive ones and non-primitive ones. For a certain n, it may be a leg or the hypotenuse in either a primitive Pythagorean triple, or a non-primitive Pythagorean triple, or both.
%C A328949 This sequence is the count of n as a leg or the hypotenuse in non-primitive Pythagorean triples.
%D A328949 A. Beiler, Recreations in the Theory of Numbers. New York: Dover Publications, pp. 116-117, 1966.
%H A328949 Ray Chandler, <a href="/A328949/b328949.txt">Table of n, a(n) for n = 1..10000</a> (first 5000 terms from Metin Sariyar)
%F A328949 a(n) = A328708(n) + A328712(n).
%F A328949 a(n) = A046081(n) - A024363(n).
%e A328949 For n=10, 10 is a leg in (10,24,26) and the hypotenuse in (6,8,10), so a(10)=A328708(10)+A328712(10)=1+1=2. And 10 is not a leg or the hypotenuse in any primitive Pythagorean triple, a(10)=A046081(10)-A024363(10)=2-0=2.
%t A328949 a[n_] := Count[{x, y} /. Solve[(x^2 + y^2 == n^2 || x^2 - y^2 == n^2) && x > y > 0, {x, y}, Integers], p_ /; GCD @@ p > 1]; Array[a, 100] (* _Giovanni Resta_, Nov 01 2019 *)
%Y A328949 Cf. A328708, A328712, A046081, A024363.
%K A328949 nonn
%O A328949 1,10
%A A328949 _Rui Lin_, Nov 01 2019