This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A261233 #14 Mar 30 2017 21:52:55 %S A261233 0,1,3,8,20,49,123,319,849,2294,6250,17112,47013,129605,358838,998805, %T A261233 2796093,7869800,22251147,63141639,179701239,512744599,1466635089, %U A261233 4205423895,12087339723,34816804310,100469592521,290336059740,839932833290,2432050970420,7047731703137,20440131344750,59334695322383,172409162871823,501489513690423,1460214792034791 %N A261233 a(n) = number of steps to reach 0 when starting from k = (3^n)-1 and repeatedly applying the map that replaces k with k - (sum of digits in base-3 representation of k). %F A261233 a(0) = 0; for n >= 1, a(n) = A261234(n-1) + a(n-1). %F A261233 a(n) = A261231((3^n)-1). %F A261233 a(n) = A261232(n)-1. %o A261233 (Scheme, two variants) %o A261233 (definec (A261233 n) (if (zero? n) n (+ (A261234 (- n 1)) (A261233 (- n 1))))) %o A261233 (define (A261233 n) (A261231 (- (A000244 n) 1))) %Y A261233 One less than A261232. %Y A261233 Cf. A000244, A261231. %Y A261233 Cf. A261234 (the first differences). %Y A261233 Cf. also A218600. %K A261233 nonn %O A261233 0,3 %A A261233 _Antti Karttunen_, Aug 13 2015 %E A261233 Terms from a(24) onward added from the output of _Hiroaki Yamanouchi_'s program by _Antti Karttunen_, Aug 16 2015