$$ 2 ^ 3 = 8 = 2 + 1 \times 6 \equiv 2 \pmod 6 \text ; $$ $$ 2 ^ 5 = 32 = 2 + 1 \times 30 \equiv 2 \pmod {30 } \text ; $$ $$ 2 ^ { 13 } = 8192 = 2 + 39 \times 210 \equiv 2 \pmod { 210 } \text ; $$ $$ 2 ^ { 61 } \equiv 2 \pmod { 30030 } \text ; $$ $$ 2 ^ { 121 } \equiv 2 \pmod { P(17) } \text ; $$ $$ 2 ^ { 361 } \equiv 2 \pmod { P(19) } \text ; $$ $$ 2 ^ { 360 q + r } \equiv {2^r} \pmod { P(19) } \text . $$ $$ 2 ^ { 3961 } \equiv 2 \pmod { P(23) } \text ; $$ Here are the results I'm trying to generalize. For example, I'm asking for an integer $ n $ such as $ 2 ^ n \equiv 2 \pmod {P(29)} $. I'm interested in primorial number system (primoradic, see stub OEIS). When you write $ 2 ^ n $ in primorial number system, periodicities appear, which can be proven using petit théorème de Fermat for example.
Using OEIS notations, $$2=(0:0:0:0:0:1:0)$$$$4=(0:0:0:0:0:2:0)$$$$8=(0:0:0:0:1:1:0)$$$$16=(0:0:0:0:2:2:0)$$$$32=(0:0:0:1:0:1:0)$$ You already see the periodicity 2 for the second coefficient : $$1-2-1-2-1-2-... $$For the third coefficient, the periodicity is 4$$(0-0-1-2-0-0-1-2-)$$ For the fourth coefficient, the periodicity is 12$$(0-0-0-0-1-2-4-3-6-5-3-...)$$
There are other results, for example: $10^{145}\equiv{10}\pmod{19\#}$ so that in primoradic $$10^{145}=(......:16:8:0:0:0:0:0:1:2:0)$$ So is $$10^{1585}\equiv{10}\pmod{23\#}$$ 1584=144x11.Every integer written base 2 can be written in primoradic.
It is at least interesting to minimize work on the computer(I use a spreadsheet) when you want to write in primoradic $ 2 ^ n $ when $ n $ is big. [with my spreadsheet, I have explored until $2^{16384}$, which is interesting because the 14-th Fermat's number is $2^{16384}+1$.See my question given in link about Fermat's numbers.] Thanks for your comments and your critics... sorry for my very bad English (French). Cordialement, Stéphane Jaouen.
P.S. : $$64=(0:0:0:2:0:2:0)$$ $$128=(0:0:0:4:1:1:0)$$ $$256=(0:0:1:1:2:2:0)$$ $$512=(0:0:2:3:0:1:0)$$ $$1024=(0:0:4:6:0:2:0)$$ $$2048=(0:0:9:5:1:1:0)$$ $$4096=(0:1:8:3:2:2:0)$$ $$8192=(0:3:6:0:0:1:0)$$ $$2^{31}=(9:14:7:9:3:6:4:1:1:0)$$ [using notations stub OEIS concerning Primorial number system] https://oeis.org/wiki/Primorial_numeral_system