[Jprogramming] Mathshallenge Repunits problems
John Randall
randall at andromeda.rutgers.edu
Tue Oct 31 21:52:44 HKT 2006
Richard Donovan wrote:
> Ref the latest two mathschallenge problems;
>
> They both relate to repunits.
>
> "A number consisting entirely of ones is called a repunit.
> We shall define R(k) to be a repunit of length k; for example, R(6) =
> 111111."
>
> I am having trouble creating large repunits as follows:
>
Minor spoiler follows.
To solve these problems, you only have to determine
A(n)=min{k | n divides R(k)}.
Can you do this without actually generating R(k)? Since A(n)>n, you are
going to have trouble doing the problems if you are trying to do divisions
of million-digit numbers.
Best wishes,
John
More information about the Programming
mailing list