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.

A235354 Minimal k > 1 such that the base-k representation of the n-th prime, read in decimal, is also prime.

This page as a plain text file.
%I A235354 #25 Aug 30 2025 11:15:31
%S A235354 3,2,2,4,4,4,4,4,2,4,7,4,5,4,2,4,7,4,3,4,4,3,4,2,4,2,3,4,4,4,6,4,8,3,
%T A235354 2,4,2,2,4,2,2,3,4,3,4,2,3,8,4,2,4,7,4,4,8,10,10,9,3,5,3,4,3,4,2,4,2,
%U A235354 6,10,3,7,4,2,3,2,2,4,10,4,3,4,3,10,3,3
%N A235354 Minimal k > 1 such that the base-k representation of the n-th prime, read in decimal, is also prime.
%C A235354 Conjecture 1. Every number 2, ..., 10 occurs infinitely many times.
%C A235354 Conjecture 2. There exists limit of average (a(1) + ... + a(n))/n.
%C A235354 Conjecture: The average in Conjecture 2 exists and is equal to 10. - _Charles R Greathouse IV_, Jan 08 2014
%H A235354 Charles R Greathouse IV, <a href="/A235354/b235354.txt">Table of n, a(n) for n = 1..10000</a>
%e A235354 Prime(7) = 17. The base 2 representation of 17 is 10001, which reinterpreted in decimal is 73 * 137; the base 3 representation of 17 is 122, which reread as decimal is 2 * 61; and the base 4 representation of 17 is 101, which reread as decimal is prime, so therefore a(7) = 4.
%t A235354 Table[Module[{b=2},While[!PrimeQ[FromDigits[IntegerDigits[p,b]]],b++];b],{p,Prime[Range[90]]}] (* _Harvey P. Dale_, Aug 30 2025 *)
%o A235354 (PARI) rebase(n,from,to=10)=subst(Pol(digits(n,from)),'x,to)
%o A235354 a(n)=my(p=prime(n)); for(b=2,9,if(isprime(rebase(p,b)),return(b))); 10 \\ _Charles R Greathouse IV_, Jan 08 2014
%Y A235354 Cf. A000040, A052033, A235377, A236174, A236437.
%K A235354 nonn,base,changed
%O A235354 1,1
%A A235354 _Vladimir Shevelev_, Jan 07 2014
%E A235354 More terms from _Peter J. C. Moses_