login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A234018 Values at middle points of each row of A233270: a(n) = A233270(A233268(n)). 5
0, -1, 0, 1, 1, 3, 3, 19, 35, 67, 127, 218, 369, 660, 1267, 2476, 4863, 9453, 18078, 34173, 64374, 121515, 227965, 426603, 793638, 1482307, 2764957, 5183333, 9830514 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,6
COMMENTS
Please see the graph of A233270.
LINKS
FORMULA
a(n) = A233270(A233268(n)).
PROG
(Scheme) (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))))))
CROSSREFS
Sequence in context: A136475 A143180 A074249 * A101617 A131443 A304562
KEYWORD
sign
AUTHOR
Antti Karttunen, Dec 29 2013
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 19 01:34 EDT 2024. Contains 370952 sequences. (Running on oeis4.)