A352520 Number of integer compositions y of n with exactly one nonfixed point y(i) != i.
0, 0, 2, 1, 4, 5, 3, 7, 8, 9, 6, 11, 12, 13, 14, 10, 16, 17, 18, 19, 20, 15, 22, 23, 24, 25, 26, 27, 21, 29, 30, 31, 32, 33, 34, 35, 28, 37, 38, 39, 40, 41, 42, 43, 44, 36, 46, 47, 48, 49, 50, 51, 52, 53, 54, 45, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 55, 67
Offset: 0
Keywords
Examples
The a(2) = 2 through a(8) = 8 compositions: (2) (3) (4) (5) (6) (7) (8) (1,1) (1,3) (1,4) (1,5) (1,6) (1,7) (2,2) (3,2) (4,2) (5,2) (6,2) (1,2,1) (1,1,3) (1,2,4) (1,2,5) (1,2,2) (1,3,3) (1,4,3) (2,2,3) (3,2,3) (1,2,3,1) (1,2,1,4) (1,2,3,2)
Crossrefs
Compositions with no nonfixed points are counted by A010054.
The version for weak excedances is A177510.
Compositions with no fixed points are counted by A238351.
The version for fixed points is A240736.
This is column k = 1 of A352523.
A011782 counts compositions.
A352513 counts nonfixed points in standard compositions.
Programs
-
Mathematica
pnq[y_]:=Length[Select[Range[Length[y]],#!=y[[#]]&]]; Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],pnq[#]==1&]],{n,0,15}]
Extensions
More terms from Alois P. Heinz, Mar 30 2022