A056735 Numbers k such that the base-3 expansions of 2^k and 2^(k+1) have the same number of 1's and the same number of digits.
5, 27, 32, 40, 54, 92, 135, 138, 151, 159, 167, 176, 189, 281, 284, 319, 401, 503, 718, 723, 734, 820, 929, 1035, 1086, 1127, 1311, 1341, 1371, 1693, 1785, 1869, 1948, 2010, 2181, 2408, 2563, 2771, 2923, 2983, 3004, 3007, 3210, 3213, 3479, 3527, 4037
Offset: 1
Examples
a(1)=5: 2^5 = 1012_3, 2^6 = 2101_2, both with two 1's and both of length 4. a(2)=27: 2^27 = 100100112222002222_3, 2^28 = 200201002221012221_3, both with four 1's and both of length 18.
Programs
-
Mathematica
Select[Range[4100],Length[IntegerDigits[2^#,3]]==Length[ IntegerDigits[ 2^(#+1),3]] && DigitCount[2^#,3,1]==DigitCount[2^(#+1),3,1]&] (* Harvey P. Dale, Jul 09 2021 *)
Comments