cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

This page as a plain text file.
%I A238057 #18 Feb 27 2014 11:10:16
%S A238057 313,317,373,797,1373,1913,1973,1997,2113,2293,2311,2347,2383,2389,
%T A238057 2953,2971,3167,3313,3373,3593,3673,3677,3719,3733,3761,4337,4397,
%U A238057 5233,5347,5953,6173,6197,6737,7193,7331,7433,7577,7877,7919,7937,10313,10337,10937
%N A238057 Primes which are the concatenation of two primes in exactly two ways.
%H A238057 Giovanni Resta, <a href="/A238057/b238057.txt">Table of n, a(n) for n = 1..1000</a>
%e A238057 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 A238057 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 A238057 (Haskell)
%o A238057 a238057 n = a238057_list !! (n-1)
%o A238057 a238057_list = filter ((== 2) . length . f) a000040_list where
%o A238057   f x = filter (\(us, vs) ->
%o A238057                head vs /= '0' &&
%o A238057                a010051' (read us :: Integer) == 1 &&
%o A238057                a010051' (read vs :: Integer) == 1) $
%o A238057                map (flip splitAt $ show x) [1 .. length (show x) - 1]
%o A238057 -- _Reinhard Zumkeller_, Feb 27 2014
%Y A238057 Cf. A105184, A238056.
%Y A238057 Cf. A010051, A000040.
%K A238057 nonn,base
%O A238057 1,1
%A A238057 _Colin Barker_, Feb 17 2014