|
|
A333595
|
|
The minimum positive integer base such that the concatenation of the first n primes in that base is also a prime.
|
|
1
|
|
|
2, 2, 4, 2, 16, 12, 72, 6, 30, 54, 22, 54, 26, 3, 24, 204, 182, 110, 286, 15, 60, 7, 228, 8, 252, 38, 68, 18, 178, 11, 280, 15, 164, 20, 170, 6, 140, 27, 76, 93, 140, 54, 166, 129, 216, 68, 322, 90, 8, 301
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
a(2*n+1) is always even; a(2*n) may be even or odd.
|
|
LINKS
|
|
|
EXAMPLE
|
For n=3, the first 3 primes are 2, 3, 5.
In base 2, their concatenation is 1011101 = 93 base 10, composite.
In base 3, their concatenation is 21012 = 194 base 10, composite (and even as it is for all odd bases).
In base 4, their concatenation is 2311 = 181 base 10, prime.
|
|
MATHEMATICA
|
a[n_] := Block[{b=2, p = Prime@ Range@ n}, While[! PrimeQ@ FromDigits[ Join @@ IntegerDigits[p, b], b], b++]; b]; Array[a, 50] (* Giovanni Resta, Apr 05 2020 *)
|
|
PROG
|
(PARI) fromfatdigits(v, b)=if(#v==0, return(0)); my(t=v[1]); for(i=2, #v, t*=b^(1+logint(v[i], b)); t+=v[i]); t;
a(n)=my(P=primes(n), b); for(b=2, P[n], if(ispseudoprime(fromfatdigits(P, b)), return(b))); b=P[n]+1; while(!ispseudoprime(fromdigits(P, b)), b++); b \\ Charles R Greathouse IV, Apr 15 2020
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|