%I #18 Apr 22 2020 19:23:34
%S 0,3,12,15,48,53,60,63,192,201,212,219,240,245,252,255,768,785,804,
%T 819,848,853,876,887,960,969,980,987,1008,1013,1020,1023,3072,3105,
%U 3140,3171,3216,3237,3276,3303,3392,3401,3412,3435,3504,3509,3548,3567,3840,3857
%N a(n) is the greatest value whose binary representation can be obtained by interleaving (or shuffling) two copies of the binary representation of n.
%C The binary representation of all positive terms are square binary words (see A191755).
%H Rémy Sigrist, <a href="/A330941/b330941.txt">Table of n, a(n) for n = 0..8192</a>
%H Rémy Sigrist, <a href="/A330941/a330941.png">Logarithmic scatterplot of the first difference of the first 2^13 terms</a>
%H Rémy Sigrist, <a href="/A330941/a330941.gp.txt">PARI program for A330941</a>
%H <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>
%F a(2^k) = 3*4^k = A002001(k+1) for any k >= 0.
%F a(2^k-1) = 4^k-1 = A024036(k) for any k >= 0.
%F a(n) >= A330940(n).
%e The first terms, alongside the binary representations of n and of a(n), are:
%e n a(n) bin(n) bin(a(n))
%e -- ---- ------ ----------
%e 0 0 0 0
%e 1 3 1 11
%e 2 12 10 1100
%e 3 15 11 1111
%e 4 48 100 110000
%e 5 53 101 110101
%e 6 60 110 111100
%e 7 63 111 111111
%e 8 192 1000 11000000
%e 9 201 1001 11001001
%e 10 212 1010 11010100
%e 11 219 1011 11011011
%e 12 240 1100 11110000
%o (PARI) See Links section.
%Y See A330940 for the minimum variant.
%Y Cf. A002001, A024036, A191755, A193020.
%K nonn,base
%O 0,2
%A _Rémy Sigrist_, Jan 04 2020