The first, 50, terms of the sequence enumerating permutations of length n suc\ h that |pi[i+1]-pi[i]| is never 2 are [1, 2, 2, 8, 28, 152, 952, 7208, 62296, 605864, 6522952, 76951496, 986411272, 13647501224, 202653304456, 3214170659528, 54223248489064, 969422707369448, 18308139748071496, 364185707232235784, 7610646121718276392, 166694564791285014056, 3818542633160305746952, 91307469325468596346184, 2274963238184099666640616, 58964548810661178633521768, 1587450065309073566176880584, 44329654081940569700351917448, 1282359809971541057027180973736, 38381483199536853680095427042984, 1187243782775351072286519836603272, 37914551857693285302587826088248776, 1248791706732055493702504100215541352, 42382670730878451397701170114905549544, 1480882994708856350790239821769105561416, 53226611729862552994117126726744528135688, 1966409374578180438745319671517606101415464, 74616646169196145364236856449319069365489448, 2906100455847850254602698701784608270034227976, 116094213749038547096884753030365221148938419784, 4754029503254127868999026541230930826499048920552, 199436253116354260697771776592297690008065770933096, 8566219817142695725531593861181466875617030940862152, 376513562849434009818604716015860357691538993901997704, 16925927332271965665391370926868639127328678316661845416, 777837512536714705756894331379281310188562259270607364008, 36524420411288445536634884424892020115915794218167610577544, 1751612518301221661167612121504638103760680520195185243739848, 85755785587386071327527030891574840407966270086700800470957416, 4284277840198451456661445469771796356077933884289016303709866984] --------------------------------- This took, 81150.296, seconds.