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

%I #8 Jan 16 2014 15:02:09

%S 0,-1,0,1,1,3,3,19,35,67,127,218,369,660,1267,2476,4863,9453,18078,

%T 34173,64374,121515,227965,426603,793638,1482307,2764957,5183333,

%U 9830514

%N Values at middle points of each row of A233270: a(n) = A233270(A233268(n)).

%C Please see the graph of A233270.

%F a(n) = A233270(A233268(n)).

%o (Scheme) (define (A234018 n) (A233270 (A233268 n)))

%o ;; Iterative version, which computes for values a(n>=4) in a single pass:

%o (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))))))))

%o (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))))))

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

%K sign

%O 1,6

%A _Antti Karttunen_, Dec 29 2013

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 August 12 19:26 EDT 2024. Contains 375113 sequences. (Running on oeis4.)