Hello!

I need to find out how many strings of 3 same numbers or more exist on Pi's first 10,000 digits. So I wrote this on Maple:

p := evalf[210](Pi);

cnt := 0;

for i to 210 do

a1 := floor(p);

if a1 = floor((p-a1)*10) then

if a1 = floor(100*(p-a1-0.1*a1)) then

cnt := cnt+1;

while a1 = floor(1000*(p-a1-0.1*a1-0.01*a1)) do

cnt := cnt+1;

p := 10*(p-a1) ;

end do;

end if;

end if;

p := 10*(p-a1);

end do;

cnt

(This one is up to 210 digits, just wanted to check).

When I run, it keeps calculating, but when I stopped (after about 10 minutes) cnt was 70571756... Where is my mistake?

Thank you very much