login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons 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

Table of n, a(n) for n=1..29.

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

Cf. A233268, A233270, A234019, A234020, A233274.

Sequence in context: A136475 A143180 A074249 * A101617 A131443 A304562

Adjacent sequences:  A234015 A234016 A234017 * A234019 A234020 A234021

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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 6 01:51 EDT 2021. Contains 343579 sequences. (Running on oeis4.)