login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A230431
After the first zero, integers from 0 to A219661(n)-1 followed by integers from 0 to A219661(n+1)-1, etc.
3
0, 0, 0, 1, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44
OFFSET
0,7
FORMULA
a(0) = a(1) = 0, and for n > 1, a(n) = n - A219665(A230411(n+1)-1).
PROG
(Scheme)
(define (A230431 n) (if (< n 2) 0 (- n (A219665 (-1+ (A230411 (+ n 1)))))))
CROSSREFS
Cf. A219661, A219665, A230411. Used to compute A230432.
Analogous sequence for binary system: A218601.
Sequence in context: A071513 A060511 A082853 * A190886 A257845 A162593
KEYWORD
nonn
AUTHOR
Antti Karttunen, Oct 22 2013
STATUS
approved