The question is , if f(n)= 1+10+10^2 + + 10^n , where n is

sigh1342
the question is , if f(n)= 1+10+10^2 +... + 10^n , where n is integer.
find the least n s.t. f(n) is divisible by 17 , I have no idea about it.

Mentor

What is the remainder if you divide...
1 by 17?
10 by 17?
100 by 17?
...
a+b by 17, if you know it for a and b?

That should help.

ramsey2879

the question is , if f(n)= 1+10+10^2 +... + 10^n , where n is integer.
find the least n s.t. f(n) is divisible by 17 , I have no idea about it.

It should also help to recognize that 9 times the sum plus 1 is a power of 10. Thus Fermats Little theorem re primes P dividing A^(P-1) - 1 may apply.

Edgardo

You can also find n by "brute force", i.e. check if f(1), f(2), f(3), ... is divisible by 17. Use http://www.wolframalpha.com/ or write a small program in your programming language of choice.

Last edited: