Edit your own copy...
|
Hosted by CoCalc
|
Download
f
(
n
)
=
n
*
(
n
+
1
)
/
2
f
(
5
)
15
for
i
in
[
1..10
]
:
print
i
,
f
(
i
)
1 1 2 3 3 6 4 10 5 15 6 21 7 28 8 36 9 45 10 55