You can
put this solution on YOUR website!n=1, 0
n=2, 3
n=3, 8
n=4, 15
n=5, 24
If I add 1 to each output I have a perfect square.
The function is then is a perfect square minus 1.

The other pattern is that the difference between two output numbers is a consecutive odd number.

That's just interesting more than anything else.
Now back to the problem.
The expression for the nth term is then, as above,

and the value for the 43rd term is then,