cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A174080 Number of permutations of length n with no consecutive triples i,i+d,i+2d for all d>0.

This page as a plain text file.
%I A174080 #16 Sep 27 2022 07:56:01
%S A174080 1,1,2,5,21,100,597,4113,32842,292379,2925367,31983248,383514347,
%T A174080 4966286235,69508102006,1039315462467,16627618496319,282023014602100,
%U A174080 5075216962675445,96263599713301975,1925002914124917950
%N A174080 Number of permutations of length n with no consecutive triples i,i+d,i+2d for all d>0.
%e A174080 For n=4, there are 4!-a(4)=3 permutations with some consecutive triple i,i+d,i+2d. Note for n=4, only d=1 applies. Hence those three permutations are (0,1,2,3), (1,2,3,0), and (3,0,1,2). Since here only d=1, this is the same value of a(4) in A002628.
%p A174080 b:= proc(s, x, y) option remember; `if`(s={}, 1, add(
%p A174080       `if`(x=0 or x<y or x-y<>y-j,
%p A174080          b(s minus {j}, y, j), 0), j=s))
%p A174080     end:
%p A174080 a:= n-> b({$1..n}, 0$2):
%p A174080 seq(a(n), n=0..14);  # _Alois P. Heinz_, Apr 13 2021
%t A174080 b[s_, x_, y_] := b[s, x, y] = If[s == {}, 1, Sum[If[x == 0 || x < y || x-y != y-j, b[s~Complement~{j}, y, j], 0], {j, s}]];
%t A174080 a[n_] := b[Range[n], 0, 0];
%t A174080 Table[a[n], {n, 0, 14}] (* _Jean-François Alcover_, Sep 27 2022, after _Alois P. Heinz_ *)
%Y A174080 Cf. A002628, A174072, A174081, A174082, A174083, A295370.
%K A174080 nonn,more
%O A174080 0,3
%A A174080 _Isaac Lambert_, Mar 15 2010
%E A174080 a(0)-a(3) and a(10)-a(20) from _Alois P. Heinz_, Apr 13 2021