|
|
A030451
|
|
a(2*n) = n, a(2*n+1) = n+2.
|
|
9
|
|
|
0, 2, 1, 3, 2, 4, 3, 5, 4, 6, 5, 7, 6, 8, 7, 9, 8, 10, 9, 11, 10, 12, 11, 13, 12, 14, 13, 15, 14, 16, 15, 17, 16, 18, 17, 19, 18, 20, 19, 21, 20, 22, 21, 23, 22, 24, 23, 25, 24, 26, 25, 27, 26, 28, 27, 29, 28, 30, 29, 31, 30, 32, 31, 33, 32, 34, 33, 35, 34, 36, 35, 37, 36, 38, 37
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
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:
._._._._._.
| | |_|
|
|
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+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
|
|
MAPLE
|
a:= n-> iquo(n, 2, 'r') +[0, 2][r+1]:
|
|
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
|
|
|
|