login
A292373
A binary encoding of 3-digits in base-4 representation of n.
6
0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 2, 2, 2, 3, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 2, 2, 2, 3, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 2, 2, 2, 3, 4, 4, 4, 5, 4, 4, 4, 5, 4, 4, 4, 5, 6, 6, 6, 7, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 2, 2, 2, 3, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 2, 2, 2, 3, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 2, 2, 2, 3, 4, 4, 4, 5, 4, 4, 4, 5, 4
OFFSET
0,13
FORMULA
a(n) = A059905(A048735(n)) = A059906(A213370(n)).
For all n >= 0, A000120(a(n)) = A160383(n).
EXAMPLE
n a(n) base-4(n) binary(a(n))
A007090(n) A007088(a(n))
-- ---- ---------- ------------
1 0 1 0
2 0 2 0
3 1 3 1
4 0 10 0
5 0 11 0
6 0 12 0
7 1 13 1
8 0 20 0
9 0 21 0
10 0 22 0
11 1 23 1
12 2 30 10
13 2 31 10
14 2 32 10
15 3 33 11
16 0 100 0
17 0 101 0
18 0 102 0
19 1 103 1
PROG
(Scheme, with memoization-macro definec)
(definec (A292373 n) (if (zero? n) n (let ((d (modulo n 4))) (+ (if (= 3 d) 1 0) (* 2 (A292373 (/ (- n d) 4)))))))
(Python)
def A292373(n): return int(bin(n&n>>1)[:1:-2][::-1], 2) # Chai Wah Wu, Jun 30 2022
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Sep 15 2017
STATUS
approved