A234019 Maximum values occurring in each row of A233270: a(n) = A233270(A233268(n) - A234020(n)).
0, -1, 0, 1, 2, 4, 6, 19, 38, 67, 127, 234, 419, 745, 1378, 2678, 5311, 10470, 20333
Offset: 1
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.
This irregular table begins as: 0; 0; -1; 0, 0; 0, 1, 0; 0, 2, 1, 2, 0; 0, 3, 3, 4, 3, 4, 3, 3, 0; 0, 4, 4, 5, 4, 6, 5, 5, 3, 5, 5, 6, 4, 5, 4, 4, 0; ... After zero, each row n is A213709(n-1) elements long.
(define (A234018 n) (A233270 (A233268 n))) ;; Iterative version, which computes for values a(n>=4) in a single pass: (define (A234018v2 n) (cond ((zero? n) 0) ((< n 4) (A234018 n)) (else (let* ((memosize (if (< n 8) 2 (+ 2 (expt 2 (- n 8))))) (memo (make-vector memosize 0))) (let loop ((u (- (A000079 n) 1)) (d (A000079 (- n 1))) (i 0) (j #f) (du #f)) (cond ((pow2? u) (let ((offset (- (floor->exact (/ i 2)) du))) (- (A054429 (vector-ref memo offset)) (vector-ref memo (+ offset (A000035 i)))))) ((and (< u d) (not j)) (vector-set! memo 0 u) (loop (A011371 u) (A233272 d) (+ i 1) 1 i)) (else (if (and j (< j memosize)) (vector-set! memo j u)) (loop (A011371 u) (A233272 d) (+ i 1) (and j (+ 1 j)) du)))))))) (define (pow2? n) (let loop ((n n) (i 0)) (cond ((zero? n) #f) ((odd? n) (and (= 1 n) i)) (else (loop (/ n 2) (1+ i))))))
Comments