OFFSET
0,2
LINKS
Hiroaki Yamanouchi, Table of n, a(n) for n = 0..100
MATHEMATICA
Table[Length@ NestWhileList[# - Total@ IntegerDigits[#, 3] &, 3^(n + 1) - 1, # > 3^n - 1 &] - 1, {n, 0, 16}] (* Michael De Vlieger, Jun 27 2016 *)
PROG
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Aug 13 2015
EXTENSIONS
a(23)-a(35) from Hiroaki Yamanouchi, Aug 16 2015
STATUS
approved