Question: Find which number appears most frequently in the first 3456 digits of the decimal expansion of Pi.

I am having a great deal of difficulty with this exercise.


Clues are

>irem(floor(evalf(K*10^n,N)),10) can be used to find the nth digits of the decimal expansion of K

A given process.


The following procedure P(n) counts the number of prime numbers ≤ n.
> P:=proc(n) local c,i;
c:=0; # initialize the counter c=0
for i from 1 to n do
if type(i,prime) then c:=c+1;
end if; # increase c by 1 if i is prime
end do;
c; # output c
end proc;
Please Wait...