OFFSET
0,2
FORMULA
Recurrence: a(2n) = a(n) + [(n+1)/2] + 1, a(2n+1) = 2n+2.
MATHEMATICA
Join[{0}, Table[IntegerExponent[6^n-2^n, 2], {n, 70}]] (* Harvey P. Dale, Mar 08 2012 *)
PROG
(PARI) a(n)=if(n<1, 0, if(n%2==0, a(n/2)+2*floor((n+2)/4)+1, n+1))
(Python)
def A093052(n): return n+(~(m:=3**n-1)& m-1).bit_length() if n else 0 # Chai Wah Wu, Jul 07 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Ralf Stephan, Mar 16 2004
STATUS
approved