login
A238057
Primes which are the concatenation of two primes in exactly two ways.
5
313, 317, 373, 797, 1373, 1913, 1973, 1997, 2113, 2293, 2311, 2347, 2383, 2389, 2953, 2971, 3167, 3313, 3373, 3593, 3673, 3677, 3719, 3733, 3761, 4337, 4397, 5233, 5347, 5953, 6173, 6197, 6737, 7193, 7331, 7433, 7577, 7877, 7919, 7937, 10313, 10337, 10937
OFFSET
1,1
LINKS
EXAMPLE
313 is in the sequence because 31 and 3 are both primes, and 3 and 13 are both primes, so there are two ways.
MATHEMATICA
spl[n_] := Block[{d = IntegerDigits@n, c = 0, z}, z = Length@d; Do[ If[ PrimeQ@ FromDigits@ Take[d, k] && d[[k + 1]] > 0 && PrimeQ@ FromDigits@ Take[d, k - z], c++], {k, z - 1}]; c]; Select[ Prime@ Range@1400, spl[#] == 2 &] (* Giovanni Resta, Feb 27 2014 *)
PROG
(Haskell)
a238057 n = a238057_list !! (n-1)
a238057_list = filter ((== 2) . length . f) a000040_list where
f x = filter (\(us, vs) ->
head vs /= '0' &&
a010051' (read us :: Integer) == 1 &&
a010051' (read vs :: Integer) == 1) $
map (flip splitAt $ show x) [1 .. length (show x) - 1]
-- Reinhard Zumkeller, Feb 27 2014
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Colin Barker, Feb 17 2014
STATUS
approved