OFFSET
1,2
COMMENTS
Defines an infinite permutation on the integers, containing cycles of infinite length, but with an inverse (A229120) that can be generated.
The least integer producing an infinite cycle is n=4: {4, 9, 16, 52, 88, 630, 1931, 1031, 2908, 53102, ...}.
EXAMPLE
The partition associated with 24 is found as follows (see A226062):
Write 24 in binary as 11000; the run lengths are 2,3.
Now subtract 1 from all but the last integer, giving 1,3.
Now reverse to 3,1; take running sum giving 3,4 and reverse again to partition {4,3};
Finally, note that {4,3} is the 5th partition of 7, and the 34th partition overall.
This shows that a(24)=34.
MATHEMATICA
<< Combinatorica`; rankpartition[(p_)?PartitionQ] := PartitionsP[Tr[p]] -Sum[(NumberOfPartitions[Tr[#1], First[#1]-1]& )[Drop[p, k]],
{k, 0, Length[p]-1}]; rankpartition[par_?PartitionQ, All]:=Tr[PartitionsP[Range[Tr[par]-1]]]+rankpartition[par];
int2par[n_Integer]:=Block[{t0, t1, t2}, t0=Length/@Split[IntegerDigits[n, 2]]; t1=Reverse@MapAt[#+1&, -1+t0, -1]; t2=FoldList[Plus, First[t1], Rest[t1]]; Reverse[t2]];
a=Table[ rankpartition[#, All]& @ int2par[n], {n, 138}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Wouter Meeussen, Sep 14 2013
STATUS
approved