Write a program to find the sum of the series: 1/12+1/22+1/32+…..1/n2.

1 answer

s = 0
for i = 1 to n
s = s + 1/(10*i+2)
next i

adapt to the language of your choice. Beware integer division.