There is such a series of numbers 1,2,5,6,9,10. Please give the general formula

There is such a series of numbers 1,2,5,6,9,10. Please give the general formula


a1=1
a2=2
An = 1 + 2 (n-1) (n is odd)
An = 2 + 2 (n-1) (n is even)



Some formulas for finding the law of numbers
The number is 1 3 6 10 15 21 28 36 45 55


A1=1=1
A2=3=1+2
A3=6=1+2+3
So an = 1 + 2 + 3 +. + n = n (n + 1) / 2
The second floor is wrong



The formula of one head, two heads and three heads is out of the special zone


One, two, three, four, five. 250