Question Number 203270 by MrGHK last updated on 13/Jan/24
$$\boldsymbol{\mathrm{find}}\:\boldsymbol{\mathrm{the}}\:\boldsymbol{\mathrm{last}}\:\mathrm{4}\:\boldsymbol{\mathrm{digits}}\:\boldsymbol{\mathrm{of}}\:\mathrm{2024}^{\mathrm{2023}} \\ $$
Answered by Frix last updated on 14/Jan/24
$$\mathrm{Last}\:\mathrm{4}\:\mathrm{digits}\:\mathrm{of}\:\mathrm{2024}^{{n}} \\ $$$${n}=\mathrm{1}\:\mathrm{2024} \\ $$$$\mathrm{Then}\:\mathrm{a}\:\mathrm{loop}\:\mathrm{of}\:\mathrm{length}\:\mathrm{50} \\ $$$${f}\left({n}\right)=\mathrm{last}\:\mathrm{4}\:\mathrm{digits}\:\mathrm{of}\:\mathrm{2024}^{{n}} \\ $$$${f}\left({n}\right)={f}\left({n}+\mathrm{50}{k}\right);\:\mathrm{2}\leqslant{n}\leqslant\mathrm{51}\wedge{k}\in\mathbb{N} \\ $$$${f}\left(\mathrm{2023}\right)={f}\left(\mathrm{23}\right)=\mathrm{7824} \\ $$