login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A234022 a(n) = A000120(A193231(n)); number of 1-bits in blue code for n. 5
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 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

LINKS

Antti Karttunen, Table of n, a(n) for n = 0..8191

Joerg Arndt, Matters Computational (The Fxtbook), section 1.19 "Invertible transforms on words", pp. 49--55. [Cf. especially pages 50 & 51].

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]

PROG

(Scheme) (define (A234022 n) (A000120 (A193231 n)))

(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

CROSSREFS

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

Cf. A000120, A193231.

Sequence in context: A083409 A317586 A303780 * A261273 A097454 A139803

Adjacent sequences:  A234019 A234020 A234021 * A234023 A234024 A234025

KEYWORD

nonn,changed

AUTHOR

Antti Karttunen, Dec 28 2013

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 18 16:07 EDT 2021. Contains 343995 sequences. (Running on oeis4.)