login
Prime numbers that can be written as the concatenation of two other prime numbers in exactly one way.
5

%I #10 Sep 16 2015 04:38:34

%S 23,37,53,73,113,137,173,193,197,211,223,229,233,241,271,283,293,307,

%T 311,331,337,347,353,359,367,379,383,389,397,433,503,523,541,547,571,

%U 593,613,617,673,677,719,733,743,761,773,977,1013,1033,1093,1097,1103

%N Prime numbers that can be written as the concatenation of two other prime numbers in exactly one way.

%H Reinhard Zumkeller, <a href="/A129800/b129800.txt">Table of n, a(n) for n = 1..10000</a>

%e 113 is a prime number and the concatenation of two prime numbers: (11)(3). This decomposition is unique because (1)(13) is not valid since 1 is not a prime.

%e However 313 can be seen as both (31)(3) and (3)(13), hence there is no unique decomposition and 313 is not in the sequence.

%t a = {}; For[n = 5, n < 200, n++, b = IntegerDigits[Prime[n]]; in = 0; For[j = 1, j < Length[b], j++, If[PrimeQ[FromDigits[Take[b, j]]] && PrimeQ[FromDigits[Drop[ b, j]]], in++ ]]; If[in == 1, AppendTo[a, Prime[n]]]]; a (* _Stefan Steinerberger_, Jun 04 2007 *)

%o (Haskell)

%o a129800 n = a129800_list !! (n-1)

%o a129800_list = filter ((== 1) . length . f) a000040_list where

%o f x = filter (\(us, vs) ->

%o a010051' (read us :: Integer) == 1 &&

%o a010051' (read vs :: Integer) == 1) $

%o map (flip splitAt $ show x) [1 .. length (show x) - 1]

%o -- _Reinhard Zumkeller_, Feb 27 2014

%Y Cf. A238056, A010051, A000040.

%K nonn,base

%O 1,1

%A _Pierre CAMI_, Jun 03 2007

%E More terms from _Stefan Steinerberger_, Jun 04 2007