login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A024361 Number of primitive Pythagorean triangles with leg n. 12
0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 2, 1, 0, 2, 1, 1, 0, 1, 2, 2, 0, 1, 2, 1, 0, 1, 2, 1, 0, 1, 1, 2, 0, 2, 2, 1, 0, 2, 2, 1, 0, 1, 2, 2, 0, 1, 2, 1, 0, 2, 2, 1, 0, 2, 2, 2, 0, 1, 4, 1, 0, 2, 1, 2, 0, 1, 2, 2, 0, 1, 2, 1, 0, 2, 2, 2, 0, 1, 2, 1, 0, 1, 4, 2, 0, 2, 2, 1, 0, 2, 2, 2, 0, 2, 2, 1, 0, 2, 2, 1, 0, 1, 2, 4 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,12

COMMENTS

Consider primitive Pythagorean triangles (A^2 + B^2 = C^2, (A, B) = 1, A <= B); sequence gives number of times A or B takes value n.

For n > 1, a(n) = 0 for n == 2 (mod 4) (n in A016825).

From Jianing Song, Apr 23 2019: (Start)

Note that all the primitive Pythagorean triangles are given by A = min{2*u*v, u^2 - v^2}, B = max{2*u*v, u^2 - v^2}, C = u^2 + v^2, where u, v are coprime positive integers, u > v and u - v is odd. As a result:

(a) if n is odd, then a(n) is the number of representations of n to the form n = u^2 - v^2, where u, v are coprime positive integers (note that this guarantees that u - v is odd) and u > v. Let s = u + v, t = u - v, then n = s*t, where s and t are unitary divisors of n and s > t, so the number of representations is A034444(n)/2 if n > 1 and 0 if n = 1;

(b) if n is divisible by 4, then a(n) is the number of representations of n to the form n = 2*u*v, where u, v are coprime positive integers (note that this also guarantees that u - v is odd because n/2 is even) and u > v. So u and v must be unitary divisors of n/2, so the number of representations is A034444(n/2)/2. Since n is divisible by 4, A034444(n/2) = A034444(n) so a(n) = A034444(n)/2.

(c) if n == 2 (mod 4), then n/2 is odd, so n = 2*u*v implies that u and v are both odd, which is not acceptable, so a(n) = 0.

a(n) = 0 if n = 1 or n == 2 (mod 4), otherwise a(n) is a power of 2.

The earliest occurrence of 2^k is 2*A002110(k+1) for k > 0. (End)

REFERENCES

Tripathi, Amitabha, On Pythagorean triples containing a fixed integer. Fibonacci Quart. 46/47 (2008/09), no. 4, 331-340.

LINKS

Antti Karttunen, Table of n, a(n) for n = 1..20000

Ron Knott, Pythagorean Triples and Online Calculators

J. S. Myers, R. Schroeppel, S. R. Shannon, N. J. A. Sloane, and P. Zimmermann, Three Cousins of Recaman's Sequence, arXiv:2004:14000, April 2020

Eric Weisstein's World of Mathematics, Pythagorean Triple

FORMULA

a(n) = A034444(n)/2 = 2^(A001221(n)-1) if n != 2 (mod 4) and n > 1, a(n) = 0 otherwise. - Jianing Song, Apr 23 2019

a(n) = A024359(n) + A024360(n). - Ray Chandler, Feb 03 2020

EXAMPLE

a(12) = 2 because 12 appears twice, in (A,B,C) = (5,12,13) and (12,35,37).

MATHEMATICA

Table[If[n == 1 || Mod[n, 4] == 2, 0, 2^(Length[FactorInteger[n]] - 1)], {n, 100}]

PROG

(PARI) A024361(n) = if(1==n||(2==(n%4)), 0, 2^(omega(n)-1)); \\ (after the Mathematica program) - Antti Karttunen, Nov 10 2018

CROSSREFS

Cf. A024359, A024360, A024362, A024363, A046079, A020883, A020884, A034444, A046079.

Sequence in context: A096419 A283616 A130182 * A305614 A190676 A329308

Adjacent sequences:  A024358 A024359 A024360 * A024362 A024363 A024364

KEYWORD

nonn

AUTHOR

David W. Wilson

EXTENSIONS

Incorrect comment removed by Ant King, Jan 28 2011

More terms from Antti Karttunen, Nov 10 2018

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified February 24 18:55 EST 2021. Contains 341584 sequences. (Running on oeis4.)