cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A117942 a(n) = a(3n) = -a(3n+1) = -a(3n+2)/2.

Original entry on oeis.org

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

Views

Author

Paul Barry, Apr 05 2006

Keywords

Comments

a(n) = a(3n)/a(0) = a(3n+1)/a(1) = a(3n+2)/a(2).
Row sums of A117941.

Crossrefs

Cf. A117592 (gives the absolute values).

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

a(n) = 2^A081603(n) * (-1)^(A062756(n)+A081603(n)). - Antti Karttunen, Jul 26 2017

Extensions

More terms from Antti Karttunen, Jul 26 2017