I have observed a cyclical pattern between the tangent function and repeating decimals.
Consider the following function:
$f(x)=\tan(\sum_{k=0}^{8} rep(1/x) \cdot 10^{kd})$,
where,
$x$ is not a multiple of $2$ or $5$,
$x>1$,
$rep(1/x)$ is the repetend of $\frac{1}{x}$,
$d$ is the period or length of $rep(1/x)$.
For $x=3$,
$rep(1/3)=3$, and, $d=1$, because $1/3=0.\overline{3}$
So,$f(3)=\tan(\sum_{k=0}^{8} rep(1/3) \cdot 10^{k})=\tan(-27)$
For $x=7$,
$rep(1/7)=142857$, and, $d=6$, because $1/7=0.\overline{142857}$
So,$f(7)=\tan(\sum_{k=0}^{8} rep(1/7) \cdot 10^{6k})=\tan(-63)$
For $x=9$,
$rep(1/9)=1$, and, $d=1$, because $1/9=0.\overline{1}$
So,$f(9)=\tan(\sum_{k=0}^{8} rep(1/9) \cdot 10^{k})=\tan(-9)$
For $x=11$,
$rep(1/11)=09$, and, $d=2$, because $1/11=0.\overline{09}$
So,$f(11)=\tan(\sum_{k=0}^{8} rep(1/11) \cdot 10^{2k})=\tan(9)$
For $x=13$,
$rep(1/13)=076923$, and, $d=6$, because $1/13=0.\overline{076923}$
So,$f(13)=\tan(\sum_{k=0}^{8} rep(1/13) \cdot 10^{6k})=\tan(63)$
For $x=17$,
$rep(1/17)=0588235294117647$, and, $d=16$, because $1/17=0.\overline{0588235294117647}$
So,$f(17)=\tan(\sum_{k=0}^{8} rep(1/17) \cdot 10^{16k})=\tan(27)$
For $x=19$,
$rep(1/19)=052631578947368421$, and, $d=18$, because $1/19=0.\overline{052631578947368421}$
So,$f(19)=\tan(\sum_{k=0}^{8} rep(1/19) \cdot 10^{18k})=\tan(81)$
For $x=21$,
$rep(1/21)=047619$, and, $d=6$, because $1/21=0.\overline{047619}$
So,$f(21)=\tan(\sum_{k=0}^{8} rep(1/21) \cdot 10^{6k})=\tan(-81)$
For the subsequent values of $x$, the tangent function starts repeating:
$f(23)=\tan(-27)$
$f(27)=\tan(-63)$
$f(29)=\tan(-9)$
$f(31)=\tan(9)$
$f(33)=\tan(63)$
$f(37)=\tan(27)$
$f(39)=\tan(81)$
$f(41)=\tan(-81)$
$f(43)=\tan(-27)$
$f(47)=\tan(-63)$
$f(49)=\tan(-9)$
$f(51)=\tan(9)$
$f(53)=\tan(63)$
$f(57)=\tan(27)$
$f(59)=\tan(81)$
$f(61)=\tan(-81)$
$f(63)=\tan(-27)$
$f(67)=\tan(-63)$
$f(69)=\tan(-9)$
$f(71)=\tan(9)$
$f(73)=\tan(63)$
$f(77)=\tan(27)$
$f(79)=\tan(81)$
$f(81)=\tan(-81)$
$f(83)=\tan(-27)$
$f(87)=\tan(-63)$
$f(89)=\tan(-9)$
$f(91)=\tan(9)$
$f(93)=\tan(63)$
$f(97)=\tan(27)$
$f(99)=\tan(81)$
$f(101)=\tan(-81) \dots$