OFFSET
1,2
EXAMPLE
Start with the sequence of natural numbers:
1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,
First pair of consecutive semiprimes are 4 and 6, swap them:
1,2,3,6,5,4,7,8,9,10,11,12,13,14,15,16,17,18,19,20,
next pair of consecutive semiprimes are 9 and 10, swap them:
1,2,3,6,5,4,7,8,10,9,11,12,13,14,15,16,17,18,19,20,
next pair of consecutive semiprimes are 14 and 15, swap them:
1,2,3,6,5,4,7,8,10,9,11,12,13,15,14,16,17,18,19,20,
etc.
MATHEMATICA
s=Range@200; sp=Select[s, 2==Total[Last/@FactorInteger[ # ]]&]; Do[a=sp[[i]]; b=sp[[i+1]]; s[[a]]=b; s[[b]]=a, {i, 1, 61, 2}]; s
CROSSREFS
KEYWORD
nonn
AUTHOR
Zak Seidov, Jun 07 2006
STATUS
approved