Solve the equations:
Find a formula for the \(n\)th term of an A.P. whose first term is \(a\) and common difference \(d\), and determine the sum of the series \(1+3+5+7+\dots\) to \(n\) terms.