# Problem 52659. Easy Sequences 15: Pythagorean Area with maximum Hypotenuse

A pythagorean triangle is defined as a right triangle with all three sides having integer lengths. Examples of pythogorean triangles are [3 4 5], [6 8 10] and [5 12 13].
For a given a limit 'n', 2 vectors are produced: 'A' and 'H', 'A' contains all unique areas of pythagorean triangles, less than or equal to 'n', while 'H' contains the largest possible hypotenuse for each area in 'A'. Write a function with 2 outputs , 'a' and 'h', which are sums of the elements of 'A' and 'H', respectively.
For example for n = 100, the produced vectors are: A = [6; 24; 30; 54; 60; 84; 96] and B = [5;10; 13; 15; 17; 25; 20].
Therefore, the output shall be: [a h] = [354 105].
NOTE: Please check this link for reference: https://oeis.org/A009112.

### Solution Stats

36.0% Correct | 64.0% Incorrect
Last Solution submitted on Jan 08, 2024

Show comments

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!