The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A244315 a(0) = 0, after which, if A176137(n) = 1, a(n) = A007814(A244230(n)), otherwise a(n) = a(n-A197433(A244230(n)-1)). 3
 0, 0, 1, 0, 0, 2, 0, 1, 0, 0, 1, 0, 0, 2, 3, 0, 1, 0, 0, 2, 0, 1, 0, 0, 1, 0, 0, 2, 0, 1, 0, 0, 1, 0, 0, 2, 3, 0, 1, 0, 0, 2, 4, 0, 1, 0, 0, 2, 0, 1, 0, 0, 1, 0, 0, 2, 3, 0, 1, 0, 0, 2, 0, 1, 0, 0, 1, 0, 0, 2, 0, 1, 0, 0, 1, 0, 0, 2, 3, 0, 1, 0, 0, 2, 0, 1, 0, 0, 1, 0, 0, 2, 0, 1, 0, 0, 1, 0, 0, 2, 3, 0, 1, 0, 0, 2, 4, 0, 1, 0, 0, 2, 0, 1, 0, 0, 1, 0, 0, 2, 3, 0, 1, 0, 0, 2, 0, 1, 0, 0, 1, 0, 5 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,6 COMMENTS For n >= 1, a(n) tells the zero-based position of the digit (from the right) where the iteration stopped at, when constructing a Semigreedy Catalan representation of n as described in A244159. LINKS Antti Karttunen, Table of n, a(n) for n = 0..4862 FORMULA a(0) = 0, and for n >= 1, if A176137(n) = 1, a(n) = A007814(A244230(n)), otherwise a(n) = a(n-A197433(A244230(n)-1)). PROG (Scheme, two alternative versions) ;; This version is based on the given recurrence and uses memoizing definec-macro from Antti Karttunen's IntSeq-library: (definec (A244315 n) (cond ((zero? n) n) ((not (zero? (A176137 n))) (A007814 (A244230 n))) (else (A244315 (- n (A197433 (-1+ (A244230 n)))))))) (define (A244315 n) (let outer_loop ((n n)) (let inner_loop ((n n) (i (A244160 n))) (cond ((zero? n) i) ((zero? i) (outer_loop n)) ((<= (A000108 i) n) (inner_loop (- n (A000108 i)) (- i 1))) (else (inner_loop n (- i 1))))))) CROSSREFS One less than A244316. Cf. A000108, A007814, A176137, A197433, A244230, A244159. Sequence in context: A283497 A265507 A035145 * A214303 A281274 A191250 Adjacent sequences:  A244312 A244313 A244314 * A244316 A244317 A244318 KEYWORD nonn AUTHOR Antti Karttunen, Jun 25 2014 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified August 8 14:04 EDT 2020. Contains 336298 sequences. (Running on oeis4.)