Like we find the unit place ( which follows the pattern ), here also it will follow the similar kinda pattern.
$13^{n}mod17$ will result in (1,13,16 or 4)
we needa check n mod 4
if n mod 4 = 0, result → 1
if n mod 4 = 1, result → 13
if n mod 4 = 2, result → 16
if n mod 4 = 3, result → 4
Answer to question 👇
$13^{99}mod17$ = 4 (bcoz 99 mod 4 = 3)