A253911 Concatenation of n-th nonprime and n-th prime.
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
Examples
a(5) = 911 because the 5th nonprime is 9 and the 5th prime is 11.
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
Programs
-
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
-
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 *)
-
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
Comments