A385924 Integers k such that 2^k-1 has 0 as its second-most significant digit in base k.
10, 19, 39, 181, 493, 941, 2454, 16111, 30730, 416488, 1433896, 1663074
Offset: 1
Examples
19 is a term since 2^19-1 = 524287 = 40861_19 has 0 as its second-most significant base 19 digit.
Programs
-
Mathematica
isok[k_] := Module[{d = IntegerDigits[2^k - 1, k]}, Length[d] >= 2 && d[[2]] == 0]
-
PARI
isok(k) = digits(2^k-1, k)[2] == 0; \\ Michel Marcus, Jul 17 2025
-
PARI
isok(k) = if (k>1, my(X=2^k-1); !((X\k^(logint(X, k)-1)) % k)); \\ Michel Marcus, Jul 17 2025
-
Python
def is_a385924(k): x = pow(2, k) - 1 r = None while x >= k: r = x % k x //= k return r == 0
-
Python
def is_a385924(k): x = pow(2, k) - 1 approx = k // k.bit_length() power = pow(k, approx) while power * k <= x: power *= k approx += 1 return (x // pow(k, approx - 1)) % k == 0
Extensions
a(11)-a(12) from Michael S. Branicky, Jul 20 2025
Comments