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

November 04 2012 by
false

0

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=0for i from 1 to n doif type(i,prime) then c:=c+1;end if; # increase c by 1 if i is primeend do;c; # output cend proc;