Var
a, s, t: real;
n, i: integer;
begin
readln(a, n);
t := 1;
for i := 1 to n do
begin
s := s + 1 / t;
t := t * a * a;
end;
writeln(s);
end.
аналог не руби для проверки блин
a=2.0
n=4
s=0.0
for i in 1..n
s+=1/a**(2*i-2)
p [a**(2*i-2), (2*i-2)]
end
p s