This is how I youtube'd and found a solution-:

Code:

```
n=89
p=1
my_sum=0
for num in str(n):
my_sum=my_sum+(int(num))**p
p=p+1
if(my_sum%n==0):
print(int(my_sum/n))
else:
print(-1)
```

I want a more mathematical way of solving this problem. like using that given equation in code and finding a solution...I know we are already using it...but I want sth different.