[go: up one dir, main page]

login
A255898
Minimum prime p such that p^n is a concatenation of two primes.
3
23, 5, 3, 7, 2, 3, 43, 47, 3, 3, 7, 11, 17, 11, 3, 29, 3, 11, 3, 109, 11, 43, 71, 19, 71, 11, 11, 3, 7, 229, 43, 269, 7, 23, 3, 61, 37, 677, 113, 863, 59, 3, 11, 487, 359, 347, 3, 19, 53, 173, 3, 127, 229, 7, 3, 3, 13, 3, 241, 41, 79, 79, 3, 83, 23, 31, 71, 31
OFFSET
1,1
LINKS
EXAMPLE
23^1 = 23 = concat(2,3);
5^2 = 25 = concat(2,5);
3^3 = 27 = concat(2,7).
MAPLE
with(numtheory): P:= proc(q) local a, k, n, ok;
for a from 1 to q do for n from 1 to q do if isprime(n) then ok:=0;
for k from 1 to ilog10(n^a) do if isprime(trunc(n^a/10^k)) and isprime(n^a mod 10^k) then ok:=1; break; fi; od;
if ok=1 then lprint(a, n); break; fi; fi; od; od; end: P(10^9);
MATHEMATICA
mp[n_]:=Module[{p=2}, While[Count[PrimeQ[#]&/@Table[FromDigits/@ TakeDrop[ IntegerDigits[ p^n], i], {i, IntegerLength[p^n]}], {True, True}]== 0, p= NextPrime[ p]]; p]; Array[mp, 70] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Oct 13 2016 *)
PROG
(PARI) a(n) = {forprime(p=2, , my(pn = p^n); for (k=1, #Str(pn), if (isprime(pn\10^k) && isprime(pn % 10^k), return (p)); ); ); } \\ Michel Marcus, Oct 22 2015
CROSSREFS
Sequence in context: A040515 A040516 A040513 * A281923 A040514 A098103
KEYWORD
nonn,base,easy
AUTHOR
Paolo P. Lava, Oct 21 2015
STATUS
approved