login
A246831
a(n) is the concatenation of n and 3n in binary.
3
0, 7, 22, 57, 76, 95, 210, 245, 280, 315, 350, 737, 804, 871, 938, 1005, 1072, 1139, 1206, 1273, 1340, 1407, 2882, 3013, 3144, 3275, 3406, 3537, 3668, 3799, 3930, 4061, 4192, 4323, 4454, 4585, 4716, 4847, 4978, 5109, 5240, 5371, 5502, 11137, 11396, 11655
OFFSET
0,2
LINKS
FORMULA
a(n) = A246830(2n,n).
EXAMPLE
a(0) = (0|0)_2 = 0.
a(1) = (1|11)_2 = 7.
a(2) = (10|110)_2 = 22.
a(3) = (11|1001)_2 = 57.
a(4) = (100|1100)_2 = 76.
a(5) = (101|1111)_2 = 95.
MAPLE
f:= proc(i, j) local r, h, k; r:=0; h:=0; k:=j;
while k>0 do r:=r+2^h*irem(k, 2, 'k'); h:=h+1 od; k:=i;
while k>0 do r:=r+2^h*irem(k, 2, 'k'); h:=h+1 od; r
end:
a:= n-> f(n, 3*n):
seq(a(n), n=0..60);
PROG
(Python)
def A246831(n):
....return int(bin(n)[2:]+bin(3*n)[2:], 2) # Chai Wah Wu, Sep 05 2014
CROSSREFS
Cf. A246830. Column k=3 of A246834.
Sequence in context: A374973 A213585 A308579 * A354430 A122238 A101289
KEYWORD
nonn,base
AUTHOR
Alois P. Heinz, Sep 04 2014
STATUS
approved