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!)
A299706 Number of Pythagorean triples with perimeter <= 10^n. 1
0, 17, 325, 4858, 64741, 808950, 9706567, 113236940, 1294080089, 14557915466 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
Eric Weisstein's World of Mathematics, Pythagorean Triple
EXAMPLE
n = 2
perimeter | Pythagorean triple
-------------------------------
12 | [ 3, 4, 5]
30 | [ 5, 12, 13]
24 | [ 6, 8, 10]
56 | [ 7, 24, 25]
40 | [ 8, 15, 17]
36 | [ 9, 12, 15]
90 | [ 9, 40, 41]
60 | [10, 24, 26]
48 | [12, 16, 20]
84 | [12, 35, 37]
60 | [15, 20, 25]
90 | [15, 36, 39]
80 | [16, 30, 34]
72 | [18, 24, 30]
70 | [20, 21, 29]
84 | [21, 28, 35]
96 | [24, 32, 40]
PROG
(Ruby)
def f(a, b, c, n)
return 0 if a + b + c > n
s = n / (a + b + c)
s += f( a - 2 * b + 2 * c, 2 * a - b + 2 * c, 2 * a - 2 * b + 3 * c, n)
s += f( a + 2 * b + 2 * c, 2 * a + b + 2 * c, 2 * a + 2 * b + 3 * c, n)
s += f(-a + 2 * b + 2 * c, -2 * a + b + 2 * c, -2 * a + 2 * b + 3 * c, n)
return s
end
def A299706(n)
(1..n).map{|i| f(3, 4, 5, 10 ** i)}
end
p A299706(8)
CROSSREFS
Sequence in context: A015693 A029535 A099275 * A318597 A142933 A180676
KEYWORD
nonn,more
AUTHOR
Seiichi Manyama, Feb 26 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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 11 23:45 EDT 2024. Contains 375082 sequences. (Running on oeis4.)