A117942 a(n) = a(3n) = -a(3n+1) = -a(3n+2)/2.
1, -1, -2, -1, 1, 2, -2, 2, 4, -1, 1, 2, 1, -1, -2, 2, -2, -4, -2, 2, 4, 2, -2, -4, 4, -4, -8, -1, 1, 2, 1, -1, -2, 2, -2, -4, 1, -1, -2, -1, 1, 2, -2, 2, 4, 2, -2, -4, -2, 2, 4, -4, 4, 8, -2, 2, 4, 2, -2, -4, 4, -4, -8, 2, -2, -4, -2, 2, 4, -4, 4, 8, 4, -4, -8, -4, 4, 8, -8, 8, 16, -1, 1, 2, 1, -1, -2, 2, -2, -4, 1, -1
Offset: 0
Keywords
Links
- Antti Karttunen, Table of n, a(n) for n = 0..19683
Programs
-
Scheme
;; A stand-alone recurrence: (define (A117942 n) (cond ((zero? n) 1) ((zero? (modulo n 3)) (A117942 (/ n 3))) (else (let ((d (modulo n 3))) (- (* d (A117942 (/ (- n d) 3)))))))) ;; An implementation based on a new formula:
-
Scheme
(define (A117942 n) (* (A000079 (A081603 n)) (expt -1 (+ (A062756 n) (A081603 n))))) ;; Antti Karttunen, Jul 26 2017
Formula
Extensions
More terms from Antti Karttunen, Jul 26 2017
Comments