Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
5
Task/Sylvesters-sequence/Julia/sylvesters-sequence.julia
Normal file
5
Task/Sylvesters-sequence/Julia/sylvesters-sequence.julia
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
sylvester(n) = (n == 1) ? big"2" : prod(sylvester, 1:n-1) + big"1"
|
||||
|
||||
foreach(n -> println(rpad(n, 3), " => ", sylvester(n)), 1:10)
|
||||
|
||||
println("Sum of reciprocals of first 10: ", sum(big"1.0" / sylvester(n) for n in 1:10))
|
||||
Loading…
Add table
Add a link
Reference in a new issue