[go: up one dir, main page]

login
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).
7
0, 1, 3, 8, 20, 49, 123, 319, 849, 2294, 6250, 17112, 47013, 129605, 358838, 998805, 2796093, 7869800, 22251147, 63141639, 179701239, 512744599, 1466635089, 4205423895, 12087339723, 34816804310, 100469592521, 290336059740, 839932833290, 2432050970420, 7047731703137, 20440131344750, 59334695322383, 172409162871823, 501489513690423, 1460214792034791
OFFSET
0,3
FORMULA
a(0) = 0; for n >= 1, a(n) = A261234(n-1) + a(n-1).
a(n) = A261231((3^n)-1).
a(n) = A261232(n)-1.
PROG
(Scheme, two variants)
(definec (A261233 n) (if (zero? n) n (+ (A261234 (- n 1)) (A261233 (- n 1)))))
(define (A261233 n) (A261231 (- (A000244 n) 1)))
CROSSREFS
One less than A261232.
Cf. A261234 (the first differences).
Cf. also A218600.
Sequence in context: A171853 A330458 A093963 * A346944 A027219 A085831
KEYWORD
nonn
AUTHOR
Antti Karttunen, Aug 13 2015
EXTENSIONS
Terms from a(24) onward added from the output of Hiroaki Yamanouchi's program by Antti Karttunen, Aug 16 2015
STATUS
approved