OFFSET
0,2
COMMENTS
In the binary expansion of n, delete everything left of the rightmost 1 bit, then interpret as ternary and add 1. - Ralf Stephan, Aug 22 2013
LINKS
Antti Karttunen, Table of n, a(n) for n = 0..65537
Michael Gilleland, Some Self-Similar Integer Sequences
R. Stephan, Some divide-and-conquer sequences ...
R. Stephan, Table of generating functions
FORMULA
a(2n) = 3a(n)-2; a(2n+1) = 2.
G.f.: 1/(1-x) + Sum_{k>=0} 3^k*x^2^k/(1 - x^2^(k+1)). - Ralf Stephan, Jun 13 2003
PROG
(PARI) A061393(n) = if(!n, 1, (1+3^valuation(n, 2))); \\ Antti Karttunen, Sep 30 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Henry Bottomley, Apr 30 2001
STATUS
approved