cp's OEIS Frontend

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.

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.

Original entry on oeis.org

0, 1, 4, 5, 256, 257, 260, 261, 67108864, 67108865, 67108868, 67108869, 67109120, 67109121, 67109124, 67109125, 1208925819614629174706176, 1208925819614629174706177, 1208925819614629174706180, 1208925819614629174706181, 1208925819614629174706432
Offset: 1

Views

Author

Gus Wiseman, Dec 29 2023

Keywords

Comments

For powers of 2 instead of 3 we have A253317.

Examples

			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}
		

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.

Programs

  • 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 *)

Formula

a(3^n) = 2^(3^n - 1).