The number 5 follows a fixed pattern when divided by 13 the remainder is
51=5
52=12
53=8
54=1
55=5
56=12
57=8
58=1
59=5
510=12
......
597=5
598=12
599=8
To find the remainder when 599 is divided by 13 we follow the above pattern after every four intervals starting from 51 the remainder 5 is repeated hence we see 51=5,55=5,59=5,513=5,517=5,521=5,525=5,...597=5
We see for (1−10), we have 1,5,9 as powers of 5 where remainder is 5 when divided by 13
For (10−20) we have 13,17 as powers of 5 where remainder =5 when divided by 13
Following this pattern for other intervals,
(20−30),21,25,29
(31−40),33,37
(41−50),41,45,49 and so on.
We get for (91−100),93,97
Hence 599 when divided by 13 will get remainder 8