# Repeating pattern of power number in base (!).

Let $$N\in\mathbb{Z}_+$$ represent as $$N = m!\cdot r_m+(m-1)!\cdot r_{m-1}+\cdots+2!\cdot r_2+1!\cdot r_1$$ Where $$0\le r_i\le i$$ for $$1\le i\le m$$

Algorithm

$$\begin{split} \frac{N-r_1}{2} &= q_1 \\ \frac{q_1-r_2}{3} &= q_2 \\ \frac{q_2-r_3}{4} &= q_3 \\ \frac{q_3-r_4}{5} &= q_4 \\ \vdots &= \vdots \\ \frac{q_{m-1}-r_m}{m+1} &= q_{m}=0 \end{split}$$

Well $$\begin{split}N &= m!\cdot r_m+(m-1)!\cdot r_{m-1}+\cdots+2!\cdot r_2+1!\cdot r_1\\ &=(r_m,r_{m-1},\dots,r_3,r_2,r_1)_! \end{split}$$

Example: $$21=(3,1,1)_!=3!\cdot 3+2!\cdot 1+1!\cdot 1=18+2+1$$

Let above conversion may call as, $$N$$ convert in base(!).

See, power numbers $$(a^x)$$ have a repeating pattern for digits $$(r_i)$$. observe below table

Table1: $$x=2$$

$$\begin{split} 1^2 =1&=(000\color{green}{0}\color{blue}{1})_! \\2^2=4&=(000\color{green}{2}\color{blue}{0})_! \\3^2=9&=(001\color{green}{1}1)_! \\4^2=16&=(002\color{green}{2}0)_! \\5^2=25&=(010\color{green}{0}\color{blue}{1})_! \\6^2=36&=(012\color{green}{0}\color{blue}{0})_! \\7^2=49&=(02001)_! \\8^2=64&=(02220)_! \\9^2=81&=(0311\color{blue}{1})_! \\10^2=100&=(0402\color{blue}{0})_! \\11^2=121&=(10001)_! \\12^2=144&=(11000)_! \\13^2=169&=(120\color{green}{0}\color{blue}{1})_! \\ \vdots& \end{split}$$

Table2: $$x=3$$

$$\begin{split} 1^3 =1&=(0000\color{green}{0}\color{blue}{1})_! \\2^3=8&=(0001\color{green}{1}\color{blue}{0})_! \\3^3=27&=(0010\color{green}{1}1)_! \\4^3=64&=(0022\color{green}{2}0)_! \\5^3=125&=(0100\color{green}{2}\color{blue}{1})_! \\6^3=216&=(0140\color{green}{0}\color{blue}{0})_! \\7^3=343&=(024101)_! \\8^3=512&=(041110)_! \\9^3=729&=(10011\color{blue}{1})_! \\10^3=1000&=(12122\color{blue}{0})_! \\11^3=1331&=(150121)_! \\12^3=1728&=(222000)_! \\13^3=2197&=(3012\color{green}{0}\color{blue}{1})_! \\ \vdots& \end{split}$$

Observation in table 1:

For the first column from the right $$(r_1)$$, the repeating pattern is "$$0,1$$" and length is $$2$$

For the second column from the right $$(r_2)$$, the repeating pattern is "$$0,2,1,2,0,0$$" and length is $$6=3!$$

I think for third column from the right $$(r_3)$$, may have repeating pattern with length $$24=4!$$

In general, for $$n^{th}$$ column from right side $$(r_n)$$, may have repeating pattern with length $$(n+1)!$$

Similar observation in table 2

Claim:

For every power$$(x\in\mathbb{Z}_+)$$ each $$n^{th}$$ columns $$(r_n)$$ have repeating pattern with length $$(n+1)!$$ ?

I think representation of base(!) is interesting, if we go deeper it might help to understand something else.

I did not create a program for the above observation (Actually I am not to good at programming nor at English) . Above observation is like similar observation from this post.

The digit in the $$n$$-th column from the right is determined by the remainder of the number modulo $$(n+1)!$$, and for a power $$m^k$$, this remainder is in turn determined by the remainder of $$m$$ modulo $$(n+1)!$$, so these digits are bound to repeat with a period of (at most) $$(n+1)!$$, as the remainder of $$m$$ modulo $$(n+1)!$$ does.