Entered persistence function with n = 999
Previous result: 0
Previous counter: 0
Entered persistence function with n = 99
Previous result: 0
Previous counter: 0
Entered persistence function with n = 9
n is a single digit number, returning n
Current persistence: 9
Current result: 81
Current counter: 1
Result is greater than 9, resetting result to 0 and continuing loop
Previous result: 0
Previous counter: 1
Entered persistence function with n = 8
n is a single digit number, returning n
Current persistence: 8
Current result: 8
Current counter: 2
Result is not greater than 9, returning counter
Current persistence: 2
Current result: 18
Current counter: 1
Result is greater than 9, resetting result to 0 and continuing loop
Previous result: 0
Previous counter: 1
Entered persistence function with n = 1
n is a single digit number, returning n
Current persistence: 1
Current result: 8
Current counter: 2
Result is not greater than 9, returning counter
2