1, 7, 8, 49, 50…
The above sequence consists of positive integers each being a sum of distinct non-negative integer powers of 7 presented in strictly increasing order.
If a(0)=1 and a(1)=7, what is a(111)?
The simplest way is to convert to binary, but we need an offset of 1.
a(0)=1 = 7^0
a(1)=7 = 7^1
a(2)=8 = 7^1 + 7^0 but 2 in binary is 10 not 11 which is 3.
So for a(111) we need 112 in binary which is 1110000
a(111)=7^6+7^5+7^4=136857
|
Posted by Jer
on 2021-08-16 09:31:59 |