login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A253911
Concatenation of n-th nonprime and n-th prime.
2
12, 43, 65, 87, 911, 1013, 1217, 1419, 1523, 1629, 1831, 2037, 2141, 2243, 2447, 2553, 2659, 2761, 2867, 3071, 3273, 3379, 3483, 3589, 3697, 38101, 39103, 40107, 42109, 44113, 45127, 46131, 48137, 49139, 50149, 51151, 52157, 54163, 55167, 56173, 57179, 58181, 60191, 62193, 63197, 64199, 65211, 66223, 68227, 69229
OFFSET
1,1
COMMENTS
Concatenate A018252(n) and A000040(n).
LINKS
EXAMPLE
a(5) = 911 because the 5th nonprime is 9 and the 5th prime is 11.
MATHEMATICA
cncat[{a_, b_}]:=FromDigits[Flatten[IntegerDigits/@{a, b}]]; Module[ {nn=100, np, len}, np = Select[Range[nn], !PrimeQ[#]&]; len=Length[np]; cncat/@Thread[{np, Prime[Range[len]]}]] (* Harvey P. Dale, Oct 17 2020 *)
PROG
(PARI) nprime(n)=c=0; k=1; while(k, if(!isprime(k), c++); if(c==n, return(k)); k++)
vector(50, n, eval(concat(Str(nprime(n)), Str(prime(n))))) \\ Derek Orr, Feb 06 2015
(Haskell)
import Data.Function (on)
a253911 n = a253911_list !! (n-1)
a253911_list = map read $
zipWith ((++) `on` show) a018252_list a000040_list :: [Integer]
-- Reinhard Zumkeller, Feb 09 2015
KEYWORD
nonn,base,easy
AUTHOR
Omar E. Pol, Feb 06 2015
STATUS
approved