A024361 Number of primitive Pythagorean triangles with leg n.
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
Offset: 1
Keywords
Examples
a(12) = 2 because 12 appears twice, in (A,B,C) = (5,12,13) and (12,35,37).
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 [math.NT], April 2020.
- Amitabha Tripathi, On Pythagorean triples containing a fixed integer, Fibonacci Quart. 46/47 (2008/09), no. 4, 331-340.
- Eric Weisstein's World of Mathematics, Pythagorean Triple
Programs
-
Mathematica
Table[If[n == 1 || Mod[n, 4] == 2, 0, 2^(Length[FactorInteger[n]] - 1)], {n, 100}]
-
PARI
A024361(n) = if(1==n||(2==(n%4)),0,2^(omega(n)-1)); \\ (after the Mathematica program) - Antti Karttunen, Nov 10 2018
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
Extensions
Incorrect comment removed by Ant King, Jan 28 2011
More terms from Antti Karttunen, Nov 10 2018
Comments