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!)
A270268 For any prime consider the concatenation of its digits written in base b, and convert it to base 10: sequence lists primes that produce other primes for every base b, 3 <= b <= 9, under this process. 0

%I #30 Mar 21 2016 21:32:20

%S 1221221,14201591,39741391,220290431,554011061,570264221,623215031,

%T 700648051,705042731,1021490321,1046114051,1107832991,1136676421,

%U 1192829461,1221992311,1362343261,1712449621,1723640701,1724002061,1773228511,2122510631,3008249821,3120492691

%N For any prime consider the concatenation of its digits written in base b, and convert it to base 10: sequence lists primes that produce other primes for every base b, 3 <= b <= 9, under this process.

%C 1221992311 is the first prime that gives a prime for b = 2 too.

%e Digits of 39741391:

%e in base 3 are 10, 100, 21, 11, 1, 10, 100, 1 and their concatenation is 1010021111101001 which is the prime 16090759 in base 10;

%e in base 4 are 3, 21, 13, 10, 1, 3, 21, 1 and their concatenation is 321131013211 which is the prime 15061477 in base 10;

%e in base 5 are 3, 14, 12, 4, 1, 3, 14, 1 and their concatenation is 31412413141 which is the prime 32935421 in base 10;

%e in base 6 are 3, 13, 11, 4, 1, 3, 13, 1 and their concatenation is 31311413131 which is the prime 196874767 in base 10;

%e in base 7 are 3, 12, 10, 4, 1, 3, 12, 1 and their concatenation is 31210413121 which is the prime 900203221 in base 10;

%e in base 8 are 3, 11, 7, 4, 1, 3, 11, 1 and their concatenation is 3117413111 which is the prime 423499337 in base 10;

%e in base 9 are 3, 10, 7, 4, 1, 3, 10, 1 and their concatenation is 3107413101 which is the prime 1209273301 in base 10.

%p P:= proc(q) local a,b,c,h,k,n, ok; for n from 1 by 2 to q do

%p if isprime(n) then ok:=1; for h from 3 to 9 do a:=[]; b:=n;

%p for k from 1 to ilog10(n)+1 do c:=convert(b mod 10,base,h);

%p if c=[] then c:=[0]; fi; b:=trunc(b/10);

%p a:=[op(a),op(c)]; od; a:=convert(a,base,h,10); b:=0;

%p for k from nops(a) by -1 to 1 do b:=b*10+a[k]; od;

%p if not isprime(b) then ok:=0; break; fi; od;

%p if ok=1 then print(n); fi; fi; od; end: P(10^12);

%Y Cf. A000040.

%K nonn,base

%O 1,1

%A _Paolo P. Lava_, Mar 14 2016

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 16:52 EDT 2024. Contains 371794 sequences. (Running on oeis4.)