OFFSET
0,2
COMMENTS
Previous name was: Once started, this mixes the natural numbers and the natural numbers shifted by 1.
Smallest number of integer-sided squares needed to tile a 2 X n rectangle. a(5) = 4:
._._._._._.
| | |_|
|___|___|_|. - Alois P. Heinz, Jun 12 2013
LINKS
FORMULA
a(n) = 3/4 -(-1)^n*3/4 +n/2.
G.f.: (2*x-x^2)/((1-x)*(1-x^2)).
a(2n) = n, a(2n+1) = n+2.
a(n+2) = a(n)+1.
a(n) = -a(-3-n).
a(n) = A110570(n,2) for n>1. - Reinhard Zumkeller, Jul 28 2005
a(n) = (n+1)-a(n-1) with n>0, a(0)=0. - Vincenzo Librandi, Nov 18 2010
a(n) = Sum_{k=1..n} (-1)^(n+k)*(k+1). - Arkadiusz Wesolowski, Nov 23 2012
a(n+1) = (a(0) + a(1) + ... + a(n))/a(n) for n>0. This formula with different initial conditions produces A008619. - Ivan Neretin, Apr 25 2016
E.g.f.: (x*exp(x) + 3*sinh(x))/2. - Ilya Gutkovskiy, Apr 25 2016
Sum_{n>=1} (-1)^n/a(n) = 1. - Amiram Eldar, Oct 04 2022
MAPLE
a:= n-> iquo(n, 2, 'r') +[0, 2][r+1]:
seq(a(n), n=0..80); # Alois P. Heinz, Jun 12 2013
MATHEMATICA
Riffle[# + 1, #] &@ Range[0, 37] (* or *)
Table[3/4 - (-1)^n 3/4 + n/2, {n, 0, 72}] (* or *)
CoefficientList[Series[(2 x - x^2)/((1 - x) (1 - x^2)), {x, 0, 72}], x] (* Michael De Vlieger, Apr 25 2016 *)
PROG
(PARI) a(n)=n\2+2*(n%2)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Daniel Smith (2true(AT)gte.net)
EXTENSIONS
New name (using existing formula) from Joerg Arndt, Apr 26 2016
STATUS
approved