import math

def Solve(first, last, total):
    a = first
    q = (total - first) / (total - last)
    n = math.log(last / a) / math.log(q) + 1
    
    return (a, q, n);

print(Solve(3, 375, 468))

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: