|
|
A352513
|
|
Number of nonfixed points in the n-th composition in standard order.
|
|
20
|
|
|
0, 0, 1, 1, 1, 2, 0, 2, 1, 2, 1, 3, 1, 1, 2, 3, 1, 2, 1, 3, 2, 2, 3, 4, 1, 2, 1, 2, 1, 3, 3, 4, 1, 2, 1, 3, 2, 2, 3, 4, 2, 3, 2, 3, 2, 4, 4, 5, 1, 2, 2, 3, 0, 2, 2, 3, 2, 2, 3, 4, 3, 4, 4, 5, 1, 2, 1, 3, 2, 2, 3, 4, 2, 3, 2, 3, 2, 4, 4, 5, 2, 3, 3, 4, 1, 3, 3
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,6
|
|
COMMENTS
|
The k-th composition in standard order (graded reverse-lexicographic, A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again. This gives a bijective correspondence between nonnegative integers and integer compositions. See also A000120, A059893, A070939, A114994, A225620.
A nonfixed point in a composition c is an index i such that c_i != i.
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
The 169th composition in standard order is (2,2,3,1), with nonfixed points {1,4}, so a(169) = 2.
|
|
MATHEMATICA
|
stc[n_]:=Differences[Prepend[Join@@ Position[Reverse[IntegerDigits[n, 2]], 1], 0]]//Reverse;
pnq[y_]:=Length[Select[Range[Length[y]], #!=y[[#]]&]];
Table[pnq[stc[n]], {n, 0, 100}]
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|