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.

Showing 1-3 of 3 results.

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

Original entry on oeis.org

1, 1, 2, 5, 21, 100, 597, 4113, 32842, 292379, 2925367, 31983248, 383514347, 4966286235, 69508102006, 1039315462467, 16627618496319, 282023014602100, 5075216962675445, 96263599713301975, 1925002914124917950
Offset: 0

Views

Author

Isaac Lambert, Mar 15 2010

Keywords

Examples

			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.
		

Crossrefs

Programs

  • Maple
    b:= proc(s, x, y) option remember; `if`(s={}, 1, add(
          `if`(x=0 or xy-j,
             b(s minus {j}, y, j), 0), j=s))
        end:
    a:= n-> b({$1..n}, 0$2):
    seq(a(n), n=0..14);  # Alois P. Heinz, Apr 13 2021
  • Mathematica
    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}]];
    a[n_] := b[Range[n], 0, 0];
    Table[a[n], {n, 0, 14}] (* Jean-François Alcover, Sep 27 2022, after Alois P. Heinz *)

Extensions

a(0)-a(3) and a(10)-a(20) from Alois P. Heinz, Apr 13 2021

A174081 Number of permutations of length n with no consecutive triples i,i+d,i+2d (mod n) for all d.

Original entry on oeis.org

16, 40, 300, 1764, 17056, 118908, 1466840, 14079340, 184672896, 2206738248, 33901722288, 458478528000
Offset: 4

Views

Author

Isaac Lambert, Mar 15 2010

Keywords

Examples

			For n=4, there are 4!-a(4)=8 permutations with some consecutive triple i,i+d,i+2d (mod 4). Here only d=1 and d=3 works, and the permutations are (0,1,2,3), (1,2,3,0), (2,3,0,1), (3,0,1,2), (0,3,2,1), (3,2,1,0), (2,1,0,3), and (1,0,3,2)
		

Crossrefs

Extensions

a(10)-a(15) from Bert Dobbelaere, May 18 2025

A174083 Number of circular permutations of length n with no consecutive triples (i, i+d, i+2d) (mod n) for all d.

Original entry on oeis.org

4, 0, 40, 168, 1652, 9408, 117896, 1019260, 12737856, 140794368, 2072921376, 25990014896, 439692361160
Offset: 4

Views

Author

Isaac Lambert, Mar 15 2010

Keywords

Comments

Circular permutations are permutations whose indices are from the ring of integers modulo n.

Examples

			For n=5 since a(5)=0 all (5-1)! = 24 circular permutations of length 5 have some consecutive triple (i, i+d, i+2d) (mod 5). For example, the permutation (0,4,2,1,3) has a triple (1,3,0) with d=2. This is clearly a special case.
		

Crossrefs

Extensions

a(10)-a(13) from Andrey Goder, Jul 03 2022
a(14)-a(16) from Bert Dobbelaere, May 18 2025
Showing 1-3 of 3 results.