This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A229119 #15 Mar 09 2024 01:45:19 %S A229119 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, %T A229119 38,21,15,13,12,109,79,58,116,126,42,86,168,253,92,29,133,179,63,125, %U A229119 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 %N 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. %C A229119 Defines an infinite permutation on the integers, containing cycles of infinite length, but with an inverse (A229120) that can be generated. %C A229119 The least integer producing an infinite cycle is n=4: {4, 9, 16, 52, 88, 630, 1931, 1031, 2908, 53102, ...}. %H A229119 <a href="/index/Per#perm">Index entries for sequences related to permutations</a> %e A229119 The partition associated with 24 is found as follows (see A226062): %e A229119 Write 24 in binary as 11000; the run lengths are 2,3. %e A229119 Now subtract 1 from all but the last integer, giving 1,3. %e A229119 Now reverse to 3,1; take running sum giving 3,4 and reverse again to partition {4,3}; %e A229119 Finally, note that {4,3} is the 5th partition of 7, and the 34th partition overall. %e A229119 This shows that a(24)=34. %t A229119 << Combinatorica`; rankpartition[(p_)?PartitionQ] := PartitionsP[Tr[p]] -Sum[(NumberOfPartitions[Tr[#1], First[#1]-1]& )[Drop[p,k]], %t A229119 {k,0,Length[p]-1}]; rankpartition[par_?PartitionQ,All]:=Tr[PartitionsP[Range[Tr[par]-1]]]+rankpartition[par]; %t A229119 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]]; %t A229119 a=Table[ rankpartition[#,All]& @ int2par[n],{n,138}] %Y A229119 Cf. A226062. %K A229119 nonn %O A229119 1,2 %A A229119 _Wouter Meeussen_, Sep 14 2013