|
|
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).
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)
|
|
LINKS
|
|
|
FORMULA
|
|
|
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
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
Incorrect comment removed by Ant King, Jan 28 2011
|
|
STATUS
|
approved
|
|
|
|