Let $p$ be a prime and $b \in \mathbb Q$ some rational number of $p$-adic value $\lvert b \rvert_p \le 1$. Further, let $(a_0, a_1, a_2, a_3,\dotsc)$ be a strictly increasing sequence of natural numbers. I'm studying series of the form
$$S(b, (a_n)_n) := bp^{a_1} + b^2p^{a_2}+b^3p^{a_3}+\dotsc$$
which under the above hypotheses converge in $\mathbb Q_p$.
It's easy to see that this limit is rational (i.e $\in \mathbb Q$) when the series is "periodic" in the sense that there are $j \le k \in \mathbb N$ such that $a_{i+mj} = a_i + mk$ for all $m \in \mathbb N_0$ and $0 \le i \le j-1$, i.e. $$(a_0,a_1,a_2,\dotsc ,a_0+k, a_1+k, \dotsc ,a_0+2k, a_1+ 2k ,\dotsc).$$
It's also rational if the sequence is eventually periodic: that is, periodic after some finite number of terms.
By analogy with $p$-adic expansions generally I feel that the converse must also be true -- that the limit must be irrational when the sequence $(a_n)_n$ is not eventually periodic in the above sense. Am I correct, and if so how can I prove it?