login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A229119 a(n) is the (reversed lexicographic, alias Mathematica ordering) rank of the partition associated with integer n by encoding the run lengths of the binary representation of n. 3
1, 3, 2, 9, 6, 5, 4, 23, 16, 11, 26, 14, 10, 8, 7, 52, 37, 27, 57, 62, 18, 41, 85, 34, 24, 17, 38, 21, 15, 13, 12, 109, 79, 58, 116, 126, 42, 86, 168, 253, 92, 29, 133, 179, 63, 125, 238, 74, 53, 39, 80, 88, 28, 59, 118, 49, 35, 25, 54, 32, 22, 20, 19, 214, 158, 117, 225, 240, 87, 169, 316, 463, 181, 64, 256, 335, 127, 239, 438, 851, 352, 134, 484, 265, 44, 189, 657, 630, 254, 93, 353, 461, 180, 334, 600, 151, 110, 81, 159, 172, 60 (list; graph; refs; listen; history; text; internal format)
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, ...

LINKS

Table of n, a(n) for n=1..101.

Link to permutations section in OEIS

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 over-all.

This determines 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

A226062

Sequence in context: A191449 A175840 A125152 * A269867 A244319 A269359

Adjacent sequences:  A229116 A229117 A229118 * A229120 A229121 A229122

KEYWORD

nonn

AUTHOR

Wouter Meeussen, Sep 14 2013

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 5 18:48 EDT 2020. Contains 334854 sequences. (Running on oeis4.)