The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A295370 Number of permutations of [n] avoiding three consecutive terms in arithmetic progression. 8
 1, 1, 2, 4, 18, 80, 482, 3280, 26244, 231148, 2320130, 25238348, 302834694, 3909539452, 54761642704, 816758411516, 13076340876500, 221396129723368, 3985720881222850, 75503196628737920, 1510373288335622576, 31634502738658957588 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,3 COMMENTS These are permutations of n whose second-differences are nonzero. - Gus Wiseman, Jun 03 2019 LINKS Wikipedia, Arithmetic progression EXAMPLE a(3) = 4: 132, 213, 231, 312. a(4) = 18: 1243, 1324, 1342, 1423, 2134, 2143, 2314, 2413, 2431, 3124, 3142, 3241, 3412, 3421, 4132, 4213, 4231, 4312. MAPLE b:= proc(s, j, k) option remember; `if`(s={}, 1,       add(`if`(k=0 or 2*j<>i+k, b(s minus {i}, i,           `if`(2*i-j in s, j, 0)), 0), i=s))     end: a:= n-> b({\$1..n}, 0\$2): seq(a(n), n=0..12); MATHEMATICA Table[Length[Select[Permutations[Range[n]], !MemberQ[Differences[#, 2], 0]&]], {n, 0, 5}] (* Gus Wiseman, Jun 03 2019 *) CROSSREFS Column k=0 of A295390. Cf. A003407, A238423, A238424. Cf. A049988, A175342, A279945, A325545, A325849, A325850, A325851, A325874, A325875. Sequence in context: A295767 A318230 A075836 * A292280 A120664 A095816 Adjacent sequences:  A295367 A295368 A295369 * A295371 A295372 A295373 KEYWORD nonn AUTHOR Alois P. Heinz, Nov 20 2017 STATUS approved

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

Last modified February 29 07:24 EST 2020. Contains 332355 sequences. (Running on oeis4.)