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.

A234022 a(n) = A000120(A193231(n)); number of 1-bits in blue code for n.

Original entry on oeis.org

0, 1, 2, 1, 2, 1, 2, 3, 4, 3, 2, 3, 2, 3, 2, 1, 2, 1, 2, 3, 2, 3, 4, 3, 4, 5, 4, 3, 4, 3, 2, 3, 4, 3, 2, 3, 4, 5, 4, 3, 4, 5, 6, 5, 4, 3, 4, 5, 2, 3, 2, 1, 4, 3, 2, 3, 4, 3, 4, 5, 2, 3, 4, 3, 4, 3, 4, 5, 2, 3, 4, 3, 4, 5, 4, 3, 6, 5, 4, 5, 2, 3, 4, 3, 2, 1, 2
Offset: 0

Views

Author

Antti Karttunen, Dec 28 2013

Keywords

Crossrefs

A234023 gives the positions where abs(a(n)-a(n+1)) > 1.

Programs

  • Python
    def a065621(n): return n^(2*(n - (n&-n)))
    def a048724(n): return n^(2*n)
    l=[0, 1]
    z=[0, 1]
    for n in range(2, 101):
        if n%2==0: l.append(a048724(l[n//2]))
        else: l.append(a065621(1 + l[(n - 1)//2]))
        z.append(bin(l[-1])[2:].count("1"))
    print(z) # Indranil Ghosh, Jun 05 2017
  • Scheme
    (define (A234022 n) (A000120 (A193231 n)))
    

Formula

a(n) = A000120(A193231(n)).
A000035(a(n)) = A000035(n) = (n mod 2) for all n. [Even terms occur only on even indices and odd terms only on odd indices, respectively]