A261234 a(n) = number of steps to reach (3^n)-1 when starting from k = (3^(n+1))-1 and repeatedly applying the map that replaces k with k - (sum of digits in base-3 representation of k).
1, 2, 5, 12, 29, 74, 196, 530, 1445, 3956, 10862, 29901, 82592, 229233, 639967, 1797288, 5073707, 14381347, 40890492, 116559600, 333043360, 953890490, 2738788806, 7881915828, 22729464587, 65652788211, 189866467219, 549596773550, 1592118137130, 4615680732717, 13392399641613, 38894563977633, 113074467549440, 329080350818600, 958725278344368, 2795854777347489
Offset: 0
Links
- Hiroaki Yamanouchi, Table of n, a(n) for n = 0..100
- Antti Karttunen, Naive C-program for computing the terms of A261234, A261236 and A261237 at the same time
- Hiroaki Yamanouchi, Fast Python-program for computing terms of A213709, A261234 and analogous sequences in other bases
Crossrefs
Programs
-
Mathematica
Table[Length@ NestWhileList[# - Total@ IntegerDigits[#, 3] &, 3^(n + 1) - 1, # > 3^n - 1 &] - 1, {n, 0, 16}] (* Michael De Vlieger, Jun 27 2016 *)
Extensions
a(23)-a(35) from Hiroaki Yamanouchi, Aug 16 2015