In a meanwhile deleted question I had mentioned my observation, that $$H\left(2^m-1\right) = H\left(3\*(2^m-1)\right) = H\left(3\*(2^m-1)\ +\ 1\right)$$
where $H()$ denotes the Hamming weight.  

  




> 
> **Question:**
> 
> 
> are there other examples of combinations of a set $\Sigma\subset\mathbb{N}$ with a function $f: \mathbb{N}\ni i\mapsto j\in\mathbb{N} $ with the following properties:
> 
> 
> * the elements of $\Sigma$ can be generated from the elements of $\mathbb{N}$ via a finite sequence of arithmetic integer operations.
> * $f$ can be evaluated with fixed, finite sequence of arithmetic integer operations and doesn't amount to a mere shift operation, i.e. $f(n)\ne 2^kn$
> * $H\left(\sigma\in\Sigma\right) = H\left(f(\sigma)\right)$
> 
> 
> 


in the original observation $\Sigma:=\lbrace 2^{i+1}-1|i\in\mathbb{N}\rbrace$ and $f:=3k\ $ resp., $\ f:=3k+1$



Certain Integer Sets of Elements with Common Hamming-weight Preserving Integer Function
The following sequences work as $\Sigma$ for $f(x)=x^2$


* $x\_n=2^n-1$ has Hamming weight $n$ as does $x\_n^2=2^{2n}-2^{n+1}+1$ (the number $2^{2n}-2^{n+1}$ has a run of $n-1$ ones followed by $n+1$ zeros in binary).
* Slightly more complicated is $x\_n=2^n+2^{n-2}-1$. Here $H(x\_n)=n-1$ and
$$x\_n^2=2^{2n}+2^{n-1}\left(2^n+2^{n-3}-8+3\right)+1.$$ For $n\ge6$ the number in parens has runs of ones of lengths $1$, $n-6$ and $2$, so $H(x\_n^2)=n-1$.


The same sequences also work for $f(x)=5x$


* $x\_n=2^n-1$. Here $H(x\_n)=n$ and $f(x\_n)=2^{n+2}+2^n-2^3+3$ also has Hamming weight $n$ when $n\ge3$.
* $x\_n=2^n+2^{n-2}-1=5\cdot2^{n-2}-1$ has Hamming weight $n-1$ as does
$$5x\_n=2^{n+2}+2^{n+1}+2^{n-2}-8+3$$ whenever $n\ge5$.


Probably it is not too difficult to cook up other such sequences. Those were the ones I could easily spot from numerical data.


