#The first, 40, terms of the sequence enumerating permutations of length n suc\ # h that pi[i+2]-pi[i] is never 3 are, let's call it L23 # or equivalently, such that pi[i+3]-pi[i] is never 2 are L23:=[1, 2, 6, 20, 88, 480, 3082, 23232, 199752, 1925040, 20532408, 240055824, 3051970920, 41912154576, 618187067448, 9745330336704, 163502244052584, 2908579765827648, 54680702467271928, 1083188959780303776, 22549856759646039240, 492172063135495855056, 11237869529212225481208, 267909607502519742316848, 6656497735020467752169640, 172082223016393335659964912, 4621623569390816384140451256, 128767672274171903819718091680, 3717085325999780878482300817704, 111032721852124559819805956763552, 3428129452182006113615974906481976, 109284446732031177004982978854793856, 3593524924452641636932033607082441672, 121769012943755916118247327388025792752, 4248381003262919143868154782135780940984, 152482284686468444040714856321099765097040, 5625788880995039311199366207146725074682984, 213202806250285492696000869733306575253319952, 8293583271826139755830910669706015113714477752, 330933987400391998067543739222738078649181623680, 13536768018548398309992136425035645802319011326568, 567284719038880092022645463949600207472526794289664, 24341659680095687344713905895935700532427232154281720, 1068868844368727082932485005368221583049278415573438816, 48006133165462369348204104405261310558671656585969477448, 2204195665341097361950950852533390795951743340934404995344, 103413477364162534803892885955238383175320072710255359802104, 4955403408940527192370378706957586710286028545544186422807408]: