I’d like to mention my recent OEIS permutation A386386. It gives a canonical ordering of the nonnegative integers based on distance from powers of 2 rather than size, and it has an explicit inverse via the decomposition n+1 = u·2^v (u odd).
The inverse position satisfies
P⁻¹(n) = n − n/(log 2 · log n) + O(n/(log n)²), reflecting a logarithmic block structure.
Question: do similar explicit, non-greedy permutations exist for other primes p, or is this phenomenon specific to p = 2?
Best,
Tom Ordo
Thanks, Ruud — that’s a very nice connection.
Indeed, your decomposition via trailing 1-bits is essentially the same 2-adic valuation structure seen from the "right edge", whereas my view measures distance from powers of 2. Both expose the same 2-adic stratification of , just with different coordinates.
Regarding my question: I believe analogous permutations do exist for odd primes , via the decomposition with coprime to , but the case is uniquely simple. Only for does the valuation induce a total, binary tree–like ordering compatible with a clean logarithmic inverse asymptotic. For , the higher branching and lack of a linear "distance from powers" notion seem to obstruct an equally canonical, non-greedy permutation.
So the phenomenon is not exclusive to , but its elegance and explicitness very likely are.
Maybe someone has a different opinion or sees other connections.
I invite you to discuss...
Tom Ordo
--
You received this message because you are subscribed to the Google Groups "SeqFan" group.
To unsubscribe from this group and stop receiving emails from it, send an email to seqfan+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/seqfan/427bdbc4-8ed8-4917-9c4b-83bf8785f8b1%40isolution.nl.
PS. For completeness, the inverse permutation admits a fully explicit formula.
Write n+1 = u * 2^v with u odd and v = v2(n+1). Then
P^(-1)(n) = (u − 1) * 2^v + (2^v − 1),
equivalently,
P^(-1)(n) = (u + 1) * 2^v − 1.
Thus the inverse is given directly by the 2-adic decomposition of n+1.