login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A337871 Primes p such that if the decimal representation of p is interpreted in base q, where q is the prime before p, the result is prime. 2

%I #12 Sep 30 2020 20:19:20

%S 23,41,43,47,67,89,157,197,199,317,337,409,461,641,683,773,937,971,

%T 991,1231,1303,1321,1453,1619,1789,1877,2003,2089,2113,2153,2203,2243,

%U 2311,2339,2351,2579,2683,2917,2971,2999,3019,3613,3709,4241,4261,4357,4481,4591,4603,4663,5059,5527,5741,6221

%N Primes p such that if the decimal representation of p is interpreted in base q, where q is the prime before p, the result is prime.

%C 3, 5 and 7 are not included because they are not legal digits in bases 2, 3 and 5.

%H Robert Israel, <a href="/A337871/b337871.txt">Table of n, a(n) for n = 1..10000</a>

%e a(3)=43 is included because 43 is prime, the previous prime is 41, and 43_41=167 is prime.

%p R:= NULL: count:= 0:

%p p:= 11:

%p while count < 100 do

%p q:= p; p:= nextprime(p);

%p L:= convert(p,base,10);

%p x:= add(L[i]*q^(i-1),i=1..nops(L));

%p if isprime(x) then count:= count+1; R:= R, p;

%p fi

%p od:

%p R;

%Y Cf. A337872.

%K nonn,base

%O 1,1

%A _J. M. Bergot_ and _Robert Israel_, Sep 27 2020

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 03:11 EDT 2024. Contains 371782 sequences. (Running on oeis4.)