Jump to content

Wolstenholme numbers: Difference between revisions

Line 44:
END # gcd # ;
# returns the nth second order harmonic number #
PROC harmonic2 = ( LONG LONG INT n )LONG LONG INT:
BEGIN
LONG LONG INT v := 0, f := 1;
LONGFOR LONGi INTTO i;n DO
i := 0;
WHILE ( i +:= 1 ) <= n DO
f *:= i * i
OD;
FOR i :=TO n 0;DO
WHILE ( i +:= 1 ) <= n DO
v +:= f OVER ( i * i )
OD;
3,045

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.