Math Distraction

A short distraction for my math readership:

What is the smallest integer n > 0, for which 9n and 9n+1 have the same number of digits?

This came upon me at work the other day, and while I came up with a solution, I started thinking about other ways one might tackle this problem. So I’m posing it to you, how would you attempt to solve this problem? What about a general solution to find all n that satisfy this critera? I’ll post my solution at some point, but I really want to know how other people would think about it.

One thought on “Math Distraction”

  1. Brute force. In R:

    floor(log10(9^seq(from=1, to=50)))

    Returns:

    [1] 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 41 42 43 44 45 46 47

    Scanning indicates that 21 is the smallest n for which it’s true.

    For a general solution, because I’m lazy and not that smart, I would just ask you.

Comments are closed.