This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A368531 #11 Dec 29 2023 08:16:51 %S A368531 0,1,4,5,256,257,260,261,67108864,67108865,67108868,67108869,67109120, %T A368531 67109121,67109124,67109125,1208925819614629174706176, %U A368531 1208925819614629174706177,1208925819614629174706180,1208925819614629174706181,1208925819614629174706432 %N A368531 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 A368531 For powers of 2 instead of 3 we have A253317. %H A368531 Michael De Vlieger, <a href="/A368531/b368531.txt">Table of n, a(n) for n = 1..256</a> %F A368531 a(3^n) = 2^(3^n - 1). %e A368531 The terms together with their binary expansions and binary indices begin: %e A368531 0: 0 ~ {} %e A368531 1: 1 ~ {1} %e A368531 4: 100 ~ {3} %e A368531 5: 101 ~ {1,3} %e A368531 256: 100000000 ~ {9} %e A368531 257: 100000001 ~ {1,9} %e A368531 260: 100000100 ~ {3,9} %e A368531 261: 100000101 ~ {1,3,9} %e A368531 67108864: 100000000000000000000000000 ~ {27} %e A368531 67108865: 100000000000000000000000001 ~ {1,27} %e A368531 67108868: 100000000000000000000000100 ~ {3,27} %e A368531 67108869: 100000000000000000000000101 ~ {1,3,27} %e A368531 67109120: 100000000000000000100000000 ~ {9,27} %e A368531 67109121: 100000000000000000100000001 ~ {1,9,27} %e A368531 67109124: 100000000000000000100000100 ~ {3,9,27} %e A368531 67109125: 100000000000000000100000101 ~ {1,3,9,27} %t A368531 Select[Range[0,10000],IntegerQ[Log[3,Times@@Join@@Position[Reverse[IntegerDigits[#,2]],1]]]&] %t A368531 (* Second program *) %t A368531 {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 A368531 A000244 lists powers of 3. %Y A368531 A048793 lists binary indices, length A000120, sum A029931. %Y A368531 A070939 gives length of binary expansion. %Y A368531 A096111 gives product of binary indices. %Y A368531 Cf. A058891, A062050, A072639, A253317, A326031, A326675, A326702, A367912, A368183, A368109. %K A368531 nonn %O A368531 1,3 %A A368531 _Gus Wiseman_, Dec 29 2023