login
The OEIS is supported by the many generous donors to the OEIS 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. 7
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
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.
Sequence in context: A344779 A317586 A303780 * A261273 A097454 A139803
KEYWORD
nonn
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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 11 17:18 EDT 2024. Contains 375073 sequences. (Running on oeis4.)