The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A229120 Inverse of permutation A229119. 2
1, 3, 2, 7, 6, 5, 15, 14, 4, 13, 10, 31, 30, 12, 29, 9, 26, 21, 63, 62, 28, 61, 8, 25, 58, 11, 18, 53, 42, 127, 126, 60, 125, 24, 57, 122, 17, 27, 50, 117, 22, 37, 106, 85, 255, 254, 124, 253, 56, 121, 250, 16, 49, 59, 114, 245, 19, 34, 54, 101, 234, 20, 45, 74, 213, 170, 511, 510, 252, 509, 120, 249, 506, 48 (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 (A229119) that can be generated.
The least integer producing an infinite cycle is n=4: {4, 7, 15, 29, 42, 37, 17, 26, 11, 10, 13, 30, 127, 77, 242, 266, 173, 205, 2034, 6474, ...}.
LINKS
EXAMPLE
See A229119.
MATHEMATICA
<< Combinatorica`; unrankpartition[n_Integer, k_Integer] := Block[{ove, res, qq, zz, mem}, ove=PartitionsP[n]-k; res={}; While[n-Tr[res]>0, qq=0; zz=0; While[(mem=NumberOfPartitions[n-Tr[res], qq + 1]) <= ove, zz = mem; qq++]; AppendTo[res, qq + 1]; ove = ove-zz]; res] /; k <= PartitionsP[n] && k > 0; unrankpartition[n_Integer, All]:=Block[{k=1, z}, While[( z=Tr[PartitionsP[Range@k]])<n, k++]; unrankpartition[k, PartitionsP[k]+n-z]]; par2int[par_?PartitionQ]:=Block[{t3, t4, t5}, t3=Differences[Prepend[Reverse[par], 0]]; t4=Reverse@MapAt[#-1&, 1+t3, 1]; t5=Flatten[Table[Mod[k, 2]+0*Range[t4[[k]]], {k, Length[t4]}]]; FromDigits[t5, 2]]; b = Table[par2int@unrankpartition[n, All], {n, 138}]
CROSSREFS
Cf. A226062.
Sequence in context: A126316 A101224 A348366 * A255067 A139285 A080398
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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 10 13:34 EDT 2024. Contains 373264 sequences. (Running on oeis4.)