OFFSET
1,1
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
MATHEMATICA
Module[{nn=100, prs, non, len}, prs=Prime[Range[nn]]; non=Complement[ Range[ nn], prs]; len=Min[Length[prs], Length[non]]; Times@@#&/@ Thread[ {Take[ prs, len], Take[non, len]}]] (* Harvey P. Dale, Dec 29 2012 *)
PROG
(Haskell)
a127118 n = a000040 n * a018252 n -- Reinhard Zumkeller, Apr 30 2014
(Python)
from sympy import prime, composite
def A127118(n):
return 2 if n == 1 else prime(n)*composite(n-1) # Chai Wah Wu, Dec 27 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Neven Juric (neven.juric(AT)apis-it.hr), Mar 21 2007
STATUS
approved