(516)7 = 5 * 72 + 1 * 71 + 6 * 70 = 258
We know
40 =1 ,
41 =4,
42 =16 ,
43 =64 ,
44 =256 &
Since we have to represent the number 258 in base 4, 5 digits is enough.
PS: Using n digits, I will be able to represent numbers from ( 0 to rn-1 ) . For example Using 4 digits of base 4 , I can represent numbers from 0 to 44 - 1, ( i.e., 0 to 255 ). In our case the number is slightly greater than 255 , so we need one more digit to represent the number, Hence 5 digits