If we have a formula Un+Pn+Tn for n, i.e. Un is the nth term of the octagonal number set etc. Is it possible for Un+Pn+Tn=166?

I tried doing this by equating the formulas, but then I get a quadratic and have to complete the square and I don't think it is right. Anyone got any ideas?

e.g:

Un = n(3n-2)

Tn = (n^2 + n)/2

Pn = n(3n-1)/2