Let F(r,b)=$(111....111)_b$ (r digits, all ones) be a number in base b. So, F(r,b)=$∑_{0≤t. If r|φ($p^k$) where p is prime, then $p^k$ will divide $(b^r-1)$. Again, $p^k$ will also divide $(b^r-1)/(b-1)$ if p∤(b-1). So, $p^k$ will divide $(111....111)_b$ (r digits, all ones) if (p,b-1)=1 and r|φ($p^k$). If (p,b-1)≠1, then p|(b-1), let k be the highest power of p, that divides (b-1). So b is of the form 1+$p^kq$ where (p,q)=1. Then F(r,b)=$∑_{0≤t≡r(mod $p^k$) as ${(1+p^kq)}^t≡1(mod\ p^k$) for all integral t≥0. Then, $p^k$ will divide F(r,b) if r|$p^k$ and $p^k|(b-1)$.
Let $p^i$ divides $(a^s-1)/(a-1)$, so $a^s$=1+(a-1)$p^i$d for some integer d. Then, $a^{sp}=(a^s)^p=(1+(a-1)p^id)^p=1+pC_1(a-1)p^id+...+(a-1)^pp^{ip}d^p$. Then,$(a^{sp}-1)/(a-1)$ is divisible by $p^{i+1}$. So, if $p^i$|F(s,a) then $p^{i+1}$ will divide F(sp,a) i.e., $(111....111)_a$ (sp digits, all 1's in base a).
Clearly, we shall find some r(the period or the length of 1's) relatively prime with b, such that $p^{m}$ where m is a natural number will divide F(r,b) for any base b. Now, if n=$p^aq^b$ and $p^a$ divides F($r_p$,b) which is (111...111)$_b$ with $r_p$ digits & $q^b$ divides F($r_q$,b), then n=$p^aq^b$ will divide (111...111)$_b$ with lcm($r_p$,$r_q$) digits and so on for any number n=$p^aq^br^c...\ $ co-prime with the base b.