Data update
This commit is contained in:
parent
4bb20c9b71
commit
cbaf4c4b64
12390 changed files with 318560 additions and 27248 deletions
|
|
@ -0,0 +1,17 @@
|
|||
include "NSLog.incl"
|
||||
|
||||
local fn SylvesterSequence( terms as int )
|
||||
NSLog( @"First %d terms of the Sylvester's sequence:", terms )
|
||||
double sum = 0
|
||||
long sylv
|
||||
for int i = 1 to terms
|
||||
if ( i == 1 ) then sylv = 2 else sylv = sylv * sylv - sylv + 1
|
||||
NSLog( @"%2d : %llu", i, sylv )
|
||||
sum = sum + 1 / (double)sylv
|
||||
next
|
||||
NSLog( @"\nSum of the reciprocals: %.15f", sum )
|
||||
end fn
|
||||
|
||||
fn SylvesterSequence( 7 )
|
||||
|
||||
HandleEvents
|
||||
Loading…
Add table
Add a link
Reference in a new issue