OFFSET
0,2
LINKS
Ivan Neretin, Table of n, a(n) for n = 0..10000
J-P. Bode, H. Harborth, C. Kimberling, Complementary Fibonacci sequences, Fibonacci Quarterly 45 (2007), 254-264.
R. Stephan, Some divide-and-conquer sequences ...
R. Stephan, Table of generating functions
FORMULA
a(n) + a(n-1) = 3n + 2 - (floor(log_2 n) mod 2) for n >= 1. - Jeffrey Shallit, Jun 08 2000
For n>0, a(n) = b(n) with b(0)=0, b(2n) = -b(n)+9n+3, b(2n+1) = -b(n)+9n+6-[n==0]. - Ralf Stephan, Oct 24 2003
a(n) = A210770(2*n+1). - Reinhard Zumkeller, Mar 25 2012
MATHEMATICA
Fold[Append[#1, Plus @@ Complement[Range[Max@#1 + 3], #1][[{#2 + 1, #2 + 2}]]] &, {1, 5}, Range[58]] (* Ivan Neretin, Mar 30 2017 *)
Table[If[n==0, 1, 3*n+2 - Mod[Floor[Log[n]/Log[2]], 2]], {n, 0, 30}] (* G. C. Greubel, Mar 08 2018 *)
PROG
(PARI) for(n=0, 30, print1(if(n==0, 1, 3*n+2 - (floor(log(n)/log(2))%2)), ", ")) \\ G. C. Greubel, Mar 08 2018
(Magma) [1] cat [3*n + 2 - (Floor((Log(n)/Log(2))) mod 2): n in [0..10]]; // G. C. Greubel, Mar 08 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
More terms from Winston C. Yang (winston(AT)cs.wisc.edu), Aug 23 2000
Term a(16)=50 fixed by Ivan Neretin, Mar 30 2017
Updated by Clark Kimberling, Feb 19 2018
STATUS
approved