OFFSET
0,4
LINKS
Antti Karttunen, Table of n, a(n) for n = 0..19683
FORMULA
PROG
(Scheme, with memoization-macro definec)
(Python)
from sympy.ntheory.factor_ import digits
def a054861(n): return (n - sum(digits(n, 3)[1:]))/2
def a(n): return 0 if n==0 else 1 + a(2*a054861(n)) # Indranil Ghosh, May 22 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Aug 12 2015
STATUS
approved