I think the formula is $n^2$.
Define $p(n): 1 + 3 + 5 + \ldots +(2n − 1) = n^2$
Then $p(n + 1): 1 + 3 + 5 + \ldots +(2n − 1) + 2n = (n + 1)^2$
So $p(n + 1): n^2 + 2n = (n + 1)^2$
The equality above is incorrect, so either my formula is wrong or my proof of the implication is wrong or both.
Can you elaborate?
Thanks.
The issue here is that $p(n+1)$ is note the statement $$ 1+3+5+\cdots+(2n-1)+2n=(n+1)^2; $$ it is the statement $$ 1+3+5+\cdots+(2n-1)+(2n+1)=(n+1)^2. $$
Why? The left side of your formula is the sum of all odd numbers between $1$ and $2n-1$. So, when you replace $n$ by $n+1$, you get the sum of all odd numbers between $1$ and $2(n+1)-1=2n+1$.