login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A238057 Primes which are the concatenation of two primes in exactly two ways. 5

%I #18 Feb 27 2014 11:10:16

%S 313,317,373,797,1373,1913,1973,1997,2113,2293,2311,2347,2383,2389,

%T 2953,2971,3167,3313,3373,3593,3673,3677,3719,3733,3761,4337,4397,

%U 5233,5347,5953,6173,6197,6737,7193,7331,7433,7577,7877,7919,7937,10313,10337,10937

%N Primes which are the concatenation of two primes in exactly two ways.

%H Giovanni Resta, <a href="/A238057/b238057.txt">Table of n, a(n) for n = 1..1000</a>

%e 313 is in the sequence because 31 and 3 are both primes, and 3 and 13 are both primes, so there are two ways.

%t 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 *)

%o (Haskell)

%o a238057 n = a238057_list !! (n-1)

%o a238057_list = filter ((== 2) . length . f) a000040_list where

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

%o head vs /= '0' &&

%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. A105184, A238056.

%Y Cf. A010051, A000040.

%K nonn,base

%O 1,1

%A _Colin Barker_, Feb 17 2014

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 14:30 EDT 2024. Contains 371914 sequences. (Running on oeis4.)