0
$\begingroup$
  • Let $p(n)$ be an arbitrary permutation of natural numbers such that $p(n)<2^k$ iff $n<2^k$.

  • Let $q(n)$ be an inverse permutation of $p(n)$.

  • Let

$$ \ell(n)=\left\lfloor\log_2 n\right\rfloor $$

  • Let $\operatorname{tr}(n)$ be A007814 i.e. number of trailing zeros in the binary expansion of $n$. Here

$$ \operatorname{tr}(n) = \ell(\gcd(n, 2^{\ell(n)})) $$

  • Let $a(n)$ be an integer sequence such that we start with $A=n, B=2^{\operatorname{tr}(A)}, C=B$ and while $A\ne B$ consecutively apply $A:=A-B, B:=2^{\operatorname{tr}(A)}, C:=2B-p(C)$. Then $a(n)$ is the same as $C$ after the whole transformation.

  • Let $b(n)$ be an integer sequence such that we start with $A=n, B=2^{\ell(A)}, C=B$ and while $A\ne B$ consecutively apply $A:=q(2B-A), B:=2^{\ell(A)}, C:=B+C$. Then $b(n)$ is the same as $C$ after the whole transformation.

Here it looks like that if $p(n)$ is identity permutation, then $a(n)$ is A122198 and $b(n)$ is A122199.

I conjecture that $b(n)$ is an inverse permutation of $a(n)$. I also conjecture that if we start with $p(n), q(n)$ to produce $a_1(n), b_1(n)$, then apply $p(n):=a_1(n), q(n):=b_1(n)$ to produce $a_2(n), b_2(n)$ etc. then there are no pairs of permutations such that $a_k=a_m$, $a_k=b_m$ or $b_k=b_m$.

Here is the PARI/GP program to check it numerically:

bc(n) = if(n == 0, 0, 3*2^logint(n, 2) - n - 1) \\ A054429 (s)
br(n) = if(n == 0, 0, my(A = binary(n)); fromdigits(concat(1, Vecrev(vector(#A - 1, i, A[i+1]))), 2)) \\ A059893 (s)
bcr(n) = if(n == 0, 0, my(A = binary(n)); fromdigits(concat(1, Vecrev(vector(#A - 1, i, 1 - A[i+1]))), 2)) \\ A059894 (s)
gr1(n) = if(n == 0, 0, my(A = 2^logint(n, 2)); bc(gr1(n - A) + A)) \\ A006068
gr2(n) = bitxor(n, n\2) \\ A003188
bb1(n) = if(n < 2, n, n + (-1)^n) \\ A065190 (s)
bb2(n) = if(n < 2, n, if(n == 2^l(n), 2*n - 1, n - 1)) \\ A153151
bb3(n) = if(n < 2, n, if((n+1) == 2^l(n+1), (n + 1)/2, n + 1)) \\ A153152
bb4(n) = if(n == 0, 0, {pow2=2; v=binary(n); L=#v-1; forstep(k=L, 2, -1, if(v[k], n-=pow2, n+=pow2); pow2*=2); return(n)};) \\ A092569 (s)
bb5(n) = bitxor(n, if(n>3, bitand(n<<1, bitneg(0, logint(n, 2))))); \\ A231550
bb6(n) = if(n<2, n, bitxor(n, 1<<(logint(n, 2)-1))); \\ A063946 (s)
bb7(n) = { my (v=0); forstep (x=#binary(n)-1, 0, -1, if (bittest(n, x), v+=2^x; ); n=bitxor(n, n\2)); return (v) } \\ A334727 (s)
bb8(n) = if(n, bitxor(n, 2<<logint(n, 2)\3), 0); \\ A165199 (s)
bb9(n)={ my (base = 2, b=digits(n, base), p=[]); for (k=1, #b, p=concat(p, b[k]); if (b[k], p=Vecrev(p))); fromdigits(p, base) } \\ A333692
bb10(n) = my(b=binary(n), k); if (#b%2, k=#b\2+2, k=#b/2+1); for (i=k, #b, b[i]=1-b[i]); fromdigits(b, 2); \\ A080261 (s)
bb11(n)={local(x='x); subst(lift(Mod(1, 2)*subst(Pol(binary(n), x), x, 1+x)), x, 2)}; \\ A193231 (s)
bb12(n) = bitxor(n, if(n, max(0, 1<<logint(n, 2) - 2<<valuation(n, 2)))); \\ A122155
p(n) = gr1(n)
q(n) = gr2(n)
a(n) = if(n == 0, 0, my(A = n, B = 2^valuation(A, 2), C = B); while(!(A == B), A -= B;  B = 2^valuation(A, 2); C = 2*B - p(C)); C)
b(n) = if(n == 0, 0, my(A = n, B = 2^logint(A, 2), C = B); while(!(A == B), A = q(2*B - A); B = 2^logint(A, 2); C += B); C)
test(n) = a(b(n)) == n

Is there a way to prove it?

$\endgroup$

0

You must log in to answer this question.