Source: 2018 Canadian Open Math Challenge Part B Problem 3
—--The doubling sum function is defined by
D(a,n)=a+2a+4a+8a+...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 ai such that D(ai,i)=n.