The first term of a sequence is 13. Starting with the second term, each term is the sum of the cubes of the digits in the previous term. For example, the second term is 1^3 + 3^3 = 28. Find the 5th term.
Third term = 2^3 + 8^3 = 520
Fourth term = 5^3 + 2^3 + 0^3 = 133
Fifth term = 1^3 + 3^3 + 3^3 = 55
Note an interesting thing
Sixth term = 5^3 + 5^3 = 250
Seventh term = 2^3 + 5^3 + 0^3 = 133
So.....starting with the fourth term , the series repeats in a cycle of three terms
13, 28, 520, 133, 55
For problems like these, we only have 5 terms to calculate. Therefore, brute forcing would be a convenient method