login
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.
2
0, 1, 4, 5, 256, 257, 260, 261, 67108864, 67108865, 67108868, 67108869, 67109120, 67109121, 67109124, 67109125, 1208925819614629174706176, 1208925819614629174706177, 1208925819614629174706180, 1208925819614629174706181, 1208925819614629174706432
OFFSET
1,3
COMMENTS
For powers of 2 instead of 3 we have A253317.
LINKS
FORMULA
a(3^n) = 2^(3^n - 1).
EXAMPLE
The terms together with their binary expansions and binary indices begin:
0: 0 ~ {}
1: 1 ~ {1}
4: 100 ~ {3}
5: 101 ~ {1,3}
256: 100000000 ~ {9}
257: 100000001 ~ {1,9}
260: 100000100 ~ {3,9}
261: 100000101 ~ {1,3,9}
67108864: 100000000000000000000000000 ~ {27}
67108865: 100000000000000000000000001 ~ {1,27}
67108868: 100000000000000000000000100 ~ {3,27}
67108869: 100000000000000000000000101 ~ {1,3,27}
67109120: 100000000000000000100000000 ~ {9,27}
67109121: 100000000000000000100000001 ~ {1,9,27}
67109124: 100000000000000000100000100 ~ {3,9,27}
67109125: 100000000000000000100000101 ~ {1,3,9,27}
MATHEMATICA
Select[Range[0, 10000], IntegerQ[Log[3, Times@@Join@@Position[Reverse[IntegerDigits[#, 2]], 1]]]&]
(* Second program *)
{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 *)
CROSSREFS
A000244 lists powers of 3.
A048793 lists binary indices, length A000120, sum A029931.
A070939 gives length of binary expansion.
A096111 gives product of binary indices.
Sequence in context: A298224 A051152 A042181 * A042717 A304286 A134463
KEYWORD
nonn
AUTHOR
Gus Wiseman, Dec 29 2023
STATUS
approved