The first, 40, terms of the sequence enumerating permutations of length n suc\ h that pi[i+7]-pi[i] is never 7 are [1, 2, 6, 24, 120, 720, 5040, 39600, 342960, 3278736, 34462224, 395927760, 4941838800, 66631425840, 962613385200, 14886942174000, 245369889743472, 4293605548083600, 79492258557758160, 1552409581307446800, 31891770367657275600, 687524518830576584880, 15518119214131849925520, 365969674285844029515504, 9001092296832628619984112, 230485996833288296386918800, 6134888229478130696385017520, 169491138896241860788030787280, 4853746229691710977123376823120, 143896497806116474103953278546000, 4411200372373377112415163438725712, 139675618319983704681634939333215600, 4563477027366668374069952468999105520, 153696617870723650671021004417286874480, 5331295048462939038253157961759262450800, 190296480837683105186307964908825271378320, 6984077075049979116611460402788901817110960, 263352426282035472411395716423240917331289424, 10195373205786715246008612641657421314201273040, 404958190293095384931135392173018978304501252400] --------------------------------- This took, 389.425, seconds.