Find the smallest positive integer t such that the decimal expansion
of 2t starts with 2003, that is,
2t = 2003...,that is, the four most significant decimal digits of 2t are 2003.
2003 * 10k <= 2t < 2004 * 10kfor some non-negative integer k. Now take logarithm to the base 10 and concentrate on the fractional parts.
Write functions to perform the following tasks:
127 = 2 * 72 + 4 * 7 + 1,i.e., the 7-ary expansion of 127 is 241 and therefore
S7(127)=2+4+1=7,which is prime.
[Course home] [Home]