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.

This page as a plain text file.
%I A385924 #63 Jul 21 2025 13:16:37
%S A385924 10,19,39,181,493,941,2454,16111,30730,416488,1433896,1663074
%N A385924 Integers k such that 2^k-1 has 0 as its second-most significant digit in base k.
%C A385924 Inspired by the Wieferich primes which ask for two least significant 0 digits of 2^(p-1)-1 in base p.
%e A385924 19 is a term since 2^19-1 = 524287 = 40861_19 has 0 as its second-most significant base 19 digit.
%t A385924 isok[k_] := Module[{d = IntegerDigits[2^k - 1, k]}, Length[d] >= 2 && d[[2]] == 0]
%o A385924 (Python)
%o A385924 def is_a385924(k):
%o A385924     x = pow(2, k) - 1
%o A385924     r = None
%o A385924     while x >= k:
%o A385924         r = x % k
%o A385924         x //= k
%o A385924     return r == 0
%o A385924 (Python)
%o A385924 def is_a385924(k):
%o A385924     x = pow(2, k) - 1
%o A385924     approx = k // k.bit_length()
%o A385924     power = pow(k, approx)
%o A385924     while power * k <= x:
%o A385924         power *= k
%o A385924         approx += 1
%o A385924     return (x // pow(k, approx - 1)) % k == 0
%o A385924 (PARI) isok(k) = digits(2^k-1, k)[2] == 0; \\ _Michel Marcus_, Jul 17 2025
%o A385924 (PARI) isok(k) = if (k>1, my(X=2^k-1); !((X\k^(logint(X, k)-1)) % k)); \\ _Michel Marcus_, Jul 17 2025
%Y A385924 Cf. A000225, A001220 (Wieferich primes).
%K A385924 nonn,base,more
%O A385924 1,1
%A A385924 _A. Lamek_, Jul 12 2025
%E A385924 a(11)-a(12) from _Michael S. Branicky_, Jul 20 2025