Let k=log2(3n+7), where k is a positive integer. Then 3n+7=2k.
So 2k−3n=7.
We seek all positive integers n such that this equation has a solution in positive integers k.
Let us try small values of n:
For n=1: 2k−3=7⟹2k=10 (not a power of 2).
For n=2: 2k−9=7⟹2k=16⟹k=4.
So n=2 works.
For n=3: 2k−27=7⟹2k=34 (not a power of 2).
For n=4: 2k−81=7⟹2k=88 (not a power of 2).
For n=5: 2k−243=7⟹2k=250 (not a power of 2).
For n=6: 2k−729=7⟹2k=736 (not a power of 2).
Let us check if there are any other solutions for larger n.
Suppose n≥2. Then 3n grows much faster than 2k for large n unless k is also large. But 2k=3n+7>3n, so 2k>3n.
But 2k=3n+7<2⋅3n for large n (since 7 is negligible compared to 3n), so 2k<2⋅3n.
Thus, 3n<2k<2⋅3n.
Take logarithms:
nlog3<klog2<nlog3+log2
So k is approximately nlog23.
But log23≈1.58496, so k≈1.58496n.
But 2k−3n=7 is a very restrictive equation. For large n, 2k and 3n are both huge, and their difference is 7.
Let us check for n=0 (but n must be positive), so skip.
Let us check for n=2 (already found), k=4.
Suppose k=3, 23=8, 3n=1 (no integer n).
Suppose k=5, 25=32, 3n=25 (not a power of 3).
Suppose k=6, 26=64, 3n=57 (not a power of 3).
Suppose k=7, 27=128, 3n=121 (not a power of 3).
Suppose k=8, 28=256, 3n=249 (not a power of 3).
Suppose k=9, 29=512, 3n=505 (not a power of 3).
Suppose k=10, 210=1024, 3n=1017 (not a power of 3).
So, only n=2 works.
Therefore, the only positive integer n such that log2(3n+7) is a positive integer is n=2.