OFFSET
1,1
COMMENTS
a(2*n+1) is always even; a(2*n) may be even or odd.
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..841
Stephen Lipp, C# program
Eric Weisstein's World of Mathematics, Smarandache-Wellin Prime
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
Stephen Lipp, Mar 27 2020
STATUS
approved