Problem

Source:

Tags: Comc, 2018 COMC



Source: 2018 Canadian Open Math Challenge Part B Problem 3 The doubling sum function is defined by \[D(a,n)=\overbrace{a+2a+4a+8a+...}^{\text{n terms}}.\]For example, we have \[D(5,3)=5+10+20=35\]and \[D(11,5)=11+22+44+88+176=341.\]Determine the smallest positive integer $n$ such that for every integer $i$ between $1$ and $6$, inclusive, there exists a positive integer $a_i$ such that $D(a_i,i)=n.$