OFFSET
1,1
COMMENTS
See Allouche and Shallit p. 328 for definition of "recurrence function".
REFERENCES
J.-P. Allouche and J. Shallit, Automatic Sequences, Cambridge Univ. Press, 2003, pp. 328-331.
FORMULA
a(1)=3, a(2)=9; thereafter define k by 2^k+2 <= n <= 2^(k+1)+1 and set a(n) = 9*2^k+n-1.
MAPLE
f:=proc(n) option remember;
if n=1 then 3 elif n=2 then 9 else
k:=floor(log(n-2)/log(2)); 9*2^k+n-1; fi; end;
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Jan 11 2011
STATUS
approved