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.

A347208 Number of permutations of [n] that are in the same position in A030298 as they are in A098281.

Original entry on oeis.org

1, 2, 3, 3, 3, 10, 5, 4, 5, 13, 3, 6, 5
Offset: 1

Views

Author

William Chang, Aug 23 2021

Keywords

Examples

			For n = 7 the a(7) = 5 permutations are 1234567, 1234576, 1236745, 6574231, 7654321, which are in positions 1, 2, 17, 4198, 5040 respectively in both sequences A030298 and A098281.
		

Crossrefs

Programs

  • Mathematica
    perms[n_] := perms[n] = If[n == 1, {{1}}, Flatten[Table[Insert[#, n, pos], {pos, -1, -n, -1}]& /@ perms[n-1], 1]];
    a[n_] := Count[Transpose@{perms[n], Permutations[Range[n]]}, {p_, p_}];
    Table[a[n], {n, 1, 10}] (* Jean-François Alcover, Sep 02 2021 *)