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.

Showing 1-1 of 1 results.

A076182 a(n) = A006666(n) mod 2.

Original entry on oeis.org

0, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Benoit Cloitre, Nov 01 2002

Keywords

Crossrefs

Programs

  • PARI
    a(n)=if(n<0,0,s=n; c=0; while(s>1,s=(s%2)*(3*s+1)/2+(1-s%2)*s/2; c++); c)%2
    
  • Scheme
    (define (A076182 n) (modulo (A006666 n) 2))
    (definec (A006666 n) (if (= 1 n) 0 (+ 1 (A006666 (A014682 n))))) ;; With memoization-macro definec
    (define (A014682 n) (if (even? n) (/ n 2) (/ (+ n n n 1) 2)))
    ;; Antti Karttunen, Aug 13 2017

Formula

a(n) = A006513(n) - 1.
Apparently also the antiparity of A064433. - Ralf Stephan, Nov 16 2004
Showing 1-1 of 1 results.