Pell numbers: Difference between revisions

→‎{{header|Oberon-07}}: Fix the near Isosoeles triangles
(Added Oberon-07)
(→‎{{header|Oberon-07}}: Fix the near Isosoeles triangles)
 
(One intermediate revision by the same user not shown)
Line 321:
<pre style="height:40ex;overflow:scroll;">
First 10 Pell numbers: 0 1 2 5 12 29 70 169 408 985
First 10 Pell-Lucas numbers: 2 2 6 14 34 82 198 478 1154 2786
 
First 10 Pell-Lucas numbers: 2 2 6 14 34 82 198 478 1154 2786
First 10 rational approximations of sqrt(2) (1.414213414214):
1/1 ~= 1.000000
3/2 ~= 1.500000
7/5 ~= 1.400000
17/12 ~= 1.416666416667
41/29 ~= 1.413793
99/70 ~= 1.414285414286
239/169 ~= 1.414201
577/408 ~= 1.414215414216
1393/985 ~= 1.414213
 
Line 346:
 
First 10 near isosceles right triangles:
[23, 34, 5]
[1220, 1321, 29]
[70119, 71120, 169]
[408696, 409697, 985]
[23784059, 23794060, 5741]
[1386023660, 1386123661, 33461]
[80782137903, 80783137904, 195025]
[470832803760, 470833803761, 1136689]
[27442104684659, 27442114684660, 6625109]
[1599442827304196, 1599442927304197, 38613965]
</pre>
 
Line 1,459:
found := found + 1
END;
t := t + i2; i0 := i1; i1 := i2
END
END NearIsoscelesRightTriangles;
Line 1,512:
</syntaxhighlight>
{{out}}
<pre style="height:40ex;overflow:scroll;">
<pre>
First 10 Pell numbers: 0 1 2 5 12 29 70 169 408 985
First 10 Pell-Lucas numbers: 2 2 6 14 34 82 198 478 1154 2786
Line 1,539:
 
First 10 near isosceles right triangles:
[23, 34, 5]
[1220, 1321, 29]
[70119, 71120, 169]
[408696, 409697, 985]
[23784059, 23794060, 5741]
[1386023660, 1386123661, 33461]
[80782137903, 80783137904, 195025]
[470832803760, 470833803761, 1136689]
[27442104684659, 27442114684660, 6625109]
[1599442827304196, 1599442927304197, 38613965]
</pre>
 
3,022

edits