A347208 Number of permutations of [n] that are in the same position in A030298 as they are in A098281.
1, 2, 3, 3, 3, 10, 5, 4, 5, 13, 3, 6, 5
Offset: 1
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.
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 *)