The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A131502 Half the number of permutations of 0..n with a zero n-th difference. 4
 0, 0, 1, 1, 8, 3, 136, 29, 928, 942, 66496, 6175, 2785856, 205678, 11122048 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,5 LINKS Table of n, a(n) for n=0..14. EXAMPLE a(5)=3 because 0,1,2,3,4,5 ; 0,2,4,3,1,5 ; and 0,4,2,1,3,5 ; and their reverses have zero 5th differences. MATHEMATICA (* naive and memory intensive implementation generating all permutations *) Table[Count[ Map[Differences[#, n - 1] &, Take[Permutations[Range[1, n]], Max[1, n!/2]]], {0}], {n, 1, 10}] (* Olivier Gérard, May 30 2024 *) PROG (Python) from math import comb from itertools import permutations def A131502(n): c = [-comb(n, i) if i&1 else comb(n, i) for i in range(n+1)] return sum(1 for p in permutations(range(n+1)) if p[0]

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified August 13 07:44 EDT 2024. Contains 375113 sequences. (Running on oeis4.)