The first, 40, terms of the sequence enumerating permutations of length n suc\ h that pi[i+8]-pi[i] is never 8 are [1, 2, 6, 24, 120, 720, 5040, 40320, 357840, 3468960, 36740880, 423775296, 5298724080, 71474211360, 1035231830640, 16030657883520, 263759846933520, 4607237356331040, 85147452093835440, 1659918545490959424, 34041175483366698480, 732583724659318306080, 16507265305794714657360, 388663208163067717272960, 9544521820377224061990000, 244038535479305375006052000, 6486342134036621288191785360, 178954944479768977751791135296, 5118010170724346190845951892240, 151539060475978086658516895268000, 4639845695174160560184503840367600, 146744205048984530384890822942381440, 4789057146026416410401377919182835280, 161120819369665381267938258908690545440, 5583053238776693750138155712056062451440, 199085265613096467445524378980712529341504, 7299673757730329443017326712273227474205360, 275000665312461887330263434920906164920345120, 10636939265911602560624436585546691896243647760, 422138782920943407096577351888798736855032421760] --------------------------------- This took, 317.940, seconds.