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.

A385924 Integers k such that 2^k-1 has 0 as its second-most significant digit in base k.

Original entry on oeis.org

10, 19, 39, 181, 493, 941, 2454, 16111, 30730, 416488, 1433896, 1663074
Offset: 1

Views

Author

A. Lamek, Jul 12 2025

Keywords

Comments

Inspired by the Wieferich primes which ask for two least significant 0 digits of 2^(p-1)-1 in base p.

Examples

			19 is a term since 2^19-1 = 524287 = 40861_19 has 0 as its second-most significant base 19 digit.
		

Crossrefs

Cf. A000225, A001220 (Wieferich primes).

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