%I #11 Dec 29 2023 08:16:51
%S 0,1,4,5,256,257,260,261,67108864,67108865,67108868,67108869,67109120,
%T 67109121,67109124,67109125,1208925819614629174706176,
%U 1208925819614629174706177,1208925819614629174706180,1208925819614629174706181,1208925819614629174706432
%N Numbers whose binary indices are all powers of 3, where a binary index of n (row n of A048793) is any position of a 1 in its reversed binary expansion.
%C For powers of 2 instead of 3 we have A253317.
%H Michael De Vlieger, <a href="/A368531/b368531.txt">Table of n, a(n) for n = 1..256</a>
%F a(3^n) = 2^(3^n - 1).
%e The terms together with their binary expansions and binary indices begin:
%e 0: 0 ~ {}
%e 1: 1 ~ {1}
%e 4: 100 ~ {3}
%e 5: 101 ~ {1,3}
%e 256: 100000000 ~ {9}
%e 257: 100000001 ~ {1,9}
%e 260: 100000100 ~ {3,9}
%e 261: 100000101 ~ {1,3,9}
%e 67108864: 100000000000000000000000000 ~ {27}
%e 67108865: 100000000000000000000000001 ~ {1,27}
%e 67108868: 100000000000000000000000100 ~ {3,27}
%e 67108869: 100000000000000000000000101 ~ {1,3,27}
%e 67109120: 100000000000000000100000000 ~ {9,27}
%e 67109121: 100000000000000000100000001 ~ {1,9,27}
%e 67109124: 100000000000000000100000100 ~ {3,9,27}
%e 67109125: 100000000000000000100000101 ~ {1,3,9,27}
%t Select[Range[0,10000],IntegerQ[Log[3,Times@@Join@@Position[Reverse[IntegerDigits[#,2]],1]]]&]
%t (* Second program *)
%t {0}~Join~Array[FromDigits[Reverse@ ReplacePart[ConstantArray[0, Max[#]], Map[# -> 1 &, #]], 2] &[3^(Position[Reverse@ IntegerDigits[#, 2], 1][[;; , 1]] - 1)] &, 255] (* _Michael De Vlieger_, Dec 29 2023 *)
%Y A000244 lists powers of 3.
%Y A048793 lists binary indices, length A000120, sum A029931.
%Y A070939 gives length of binary expansion.
%Y A096111 gives product of binary indices.
%Y Cf. A058891, A062050, A072639, A253317, A326031, A326675, A326702, A367912, A368183, A368109.
%K nonn
%O 1,3
%A _Gus Wiseman_, Dec 29 2023