A056734 Positive numbers k such that, in base 3, 2^k and 2^(k+1) have the same number of digits and the same number of 0's.
2, 5, 8, 10, 18, 21, 27, 29, 35, 40, 62, 67, 83, 92, 138, 146, 165, 184, 298, 346, 428, 487, 666, 750, 785, 929, 937, 1064, 1086, 1156, 1162, 1240, 1614, 1706, 1739, 1788, 2327, 2389, 2533, 2649, 2937, 3240, 3403, 3489, 3549, 3619, 3693, 3817, 3866, 4175
Offset: 1
Examples
First term: 2^2 = 11_3, 2^3 = 22_3, both with 0 zeros and both of length 2. Second term: 2^5 = 1012_3, 2^6 = 2101_3, both with 1 zero and both of length 4.
Links
- Harvey P. Dale, Table of n, a(n) for n = 1..200
Programs
-
Mathematica
Select[Range[4200],IntegerLength[2^#,3]==IntegerLength[2^(#+1),3] && DigitCount[ 2^#,3,0]==DigitCount[2^(#+1),3,0]&] (* Harvey P. Dale, Dec 10 2021 *)
-
PARI
isok(k) = my(da=digits(2^k, 3), db=digits(2^(k+1), 3)); (#da == #db) && (#select(x->(x==0), da) == #select(x->(x==0), db)); \\ Michel Marcus, Jul 01 2021
Comments