A385157 Numbers k so that the binary expansion of 3^k starts with the binary expansion of k.
1, 2, 3, 9, 27, 65, 95, 123, 163, 303, 451, 597, 760, 1757, 2546, 2700, 7142, 25030, 25719, 25772, 49105, 61426, 90981, 107497, 194210, 659077, 6732590, 8513462, 9344030, 14549893, 32276115, 89912342, 181720904, 280120681, 437484689, 896754175, 10625891495, 30605576222
Offset: 1
Examples
9 is in the sequence as 3^9 is 100110011100011 in binary, and 9 is 1001.
Programs
-
Mathematica
q[k_] := k < Log[3, k+1] + (Floor[k*Log2[3]-Log2[k]])/Log2[3]; Select[Range[10^5], q] (* Amiram Eldar, Jun 20 2025 *)
-
PARI
isok(k) = my(bk = binary(k), vb=Vec(binary(3^k), #bk)); vb == bk; \\ Michel Marcus, Jun 20 2025
Extensions
a(26) from Hugo Pfoertner, Jun 20 2025
a(27)-a(36) from Amiram Eldar, Jun 20 2025
a(37)-a(38) from Jinyuan Wang, Jun 27 2025
Comments