OFFSET
1,2
COMMENTS
Note that 4 is the only power of 2 not here. All terms are either 2^k or 5*2^k.
LINKS
FORMULA
G.f.: (1 + 2x + 6x^2 + x^3)/(1 - 2x^2).
Sum_{n>=1} 1/a(n) = 43/20. - Amiram Eldar, Jan 21 2022
MATHEMATICA
LinearRecurrence[{0, 2}, {1, 2, 8, 5}, 50] (* or *) With[{nn=20}, Join[{1, 2}, Riffle[ 8*2^Range[0, nn], 5 2^Range[0, nn]]]] (* Harvey P. Dale, Sep 28 2016 *)
PROG
(PARI) a(n)=if(n<2, 1+max(-1, n), 2^(n\2)*if(n%2, 5/2, 4))
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
Edited by T. D. Noe, Nov 12 2010
STATUS
approved