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.

A374167 a(n) is the largest k such that the binary representation of prime(n), when interpreted as a base-b number, yields a prime for every b in 2..k.

This page as a plain text file.
%I A374167 #11 Jul 04 2024 10:26:28
%S A374167 3,2,2,3,3,3,2,2,2,2,2,2,3,2,4,2,2,2,3,2,3,3,2,2,2,2,2,2,3,2,3,2,2,2,
%T A374167 2,5,2,2,2,5,2,5,5,3,2,2,3,3,3,4,5,2,2,3,2,2,2,2,2,2,3,2,2,2,2,2,3,2,
%U A374167 2,2,2,2,3,2,2,2,2,2,2,2,2,3,2,2,2,5,2
%N A374167 a(n) is the largest k such that the binary representation of prime(n), when interpreted as a base-b number, yields a prime for every b in 2..k.
%C A374167 a(n) = 2 iff prime(n) is not in A235266.
%C A374167 Conjecture: every integer > 1 eventually appears.
%F A374167 a(n) = max{ k : Sum_{j=0..D} b^j * d_j is a prime for b = 2..k } where the digits of the binary representation of n are d_D, d_{D-1}, ..., d_1, d_0.
%e A374167 a(1) = 3 because prime(1) = 2 = 10_2, and both 10_2 = 2 and 10_3 = 3 are primes, but 10_4 = 4 = 2*2.
%e A374167 a(36) = 5 because prime(36) = 151 = 10010111_2, and
%e A374167   10010111_2 = 151 is a prime
%e A374167   10010111_3 = 2281 is a prime,
%e A374167   10010111_4 = 16661 is a prime, and
%e A374167   10010111_5 = 78781 is a prime, but
%e A374167   10010111_6 = 281275 = 5^2 * 11251.
%o A374167 (PARI) a(n) = my(v=binary(prime(n)), b=2); while (isprime(fromdigits(v, b)), b++); b-1; \\ _Michel Marcus_, Jul 02 2024
%Y A374167 Cf. A235266, A374264.
%K A374167 nonn,base
%O A374167 1,1
%A A374167 _Jon E. Schoenfield_, Jun 29 2024