login
Concatenation of n-th prime and n-th nonprime.
2

%I #10 Feb 09 2015 15:47:40

%S 21,34,56,78,119,1310,1712,1914,2315,2916,3118,3720,4121,4322,4724,

%T 5325,5926,6127,6728,7130,7332,7933,8334,8935,9736,10138,10339,10740,

%U 10942,11344,12745,13146,13748,13949,14950,15151,15752,16354,16755,17356,17957,18158,19160,19362,19763,19964,21165,22366,22768,22969

%N Concatenation of n-th prime and n-th nonprime.

%C Concatenate A000040(n) and A018252(n).

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

%e a(5) = 119 because the 5th prime is 11 and the 5th nonprime is 9.

%o (PARI) nprime(n)=c=0;k=1;while(k,if(!isprime(k),c++);if(c==n,return(k));k++)

%o vector(50,n,eval(concat(Str(prime(n)),Str(nprime(n))))) \\ _Derek Orr_, Feb 06 2015

%o (Haskell)

%o import Data.Function (on)

%o a253911 n = a253911_list !! (n-1)

%o a253911_list = map read $

%o zipWith ((++) `on` show) a018252_list a000040_list :: [Integer]

%o -- _Reinhard Zumkeller_, Feb 09 2015

%Y Cf. A000040, A018252, A038530, A045532, A075110, A106582, A138821, A138822, A253911.

%K nonn,base,easy

%O 1,1

%A _Omar E. Pol_, Feb 06 2015