[go: up one dir, main page]

login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A117942
a(n) = a(3n) = -a(3n+1) = -a(3n+2)/2.
4
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,3
COMMENTS
a(n) = a(3n)/a(0) = a(3n+1)/a(1) = a(3n+2)/a(2).
Row sums of A117941.
LINKS
FORMULA
a(n) = 2^A081603(n) * (-1)^(A062756(n)+A081603(n)). - Antti Karttunen, Jul 26 2017
PROG
(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
CROSSREFS
Cf. A117592 (gives the absolute values).
Sequence in context: A145788 A323861 A117592 * A290092 A066877 A240071
KEYWORD
sign
AUTHOR
Paul Barry, Apr 05 2006
EXTENSIONS
More terms from Antti Karttunen, Jul 26 2017
STATUS
approved