Consider the sequence of natural numbers generated by:
$f(n) = 2 n + (-1)^n/2 - 1/2$,
for $n > 0$ and $n \in \mathbb{Z}^+$ (positive integers):
i.e., {1, 4, 5, 8, 9, 12, 13, 16, 17, 20, ...}
Inspired by this mathematics question, how would one use FunctionExpand
, Simplify
, FullSimplify
, FindSequenceFunction
, various substitution rules, and other Mathematica functions to derive (not confirm) that
$$f(n) = \left\lfloor {4 \over 3} \left\lfloor {3 n \over 2} \right\rfloor \right\rfloor ,$$
where of course $\lfloor x \rfloor$ or Floor[x]
(read "floor of $x$") is the greatest integer less than or equal to $x$, or that
$$f(n) = 2n - (n\!\!\!\!\!\!\mod2)?$$