* Let $a(n)$ be [A080075][1] i.e. Proth numbers: of the form $k2^m + 1$ for $k$ odd, $m \geqslant 1$ and $2^m > k$.

The sequence begins with

$$
3, 5, 9, 13, 17, 25, 33, 41, 49, 57, 65, 81, 97, 113, 129
$$

* Let

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

* Let $\operatorname{tr(n)}$ be [A007814][2] i.e. number of trailing zeros in the binary expansion of $n$.

* Let $b_1(n)$ be [A157892][3] i.e. values of $k$ in [A080075][1].

The sequence begins with

$$
1, 1, 1, 3, 1, 3, 1, 5, 3, 7, 1, 5, 3, 7, 1
$$

* Let $b_2(n)$ be [A157893][4] i.e. values of $m$ in [A080075][1].

The sequence begins with

$$
1, 2, 3, 2, 4, 3, 5, 3, 4, 3, 6, 4, 5, 4, 7
$$

* Let $c(n)$ be [A162751][5] i.e. write down in binary the $n$-th positive (odd) integer that is a palindrome in base $2$. Take only the leftmost half of the digits (including the middle digit if there are an odd number of digits). $c(n)$ is the decimal equivalent of the result.

The sequence begins with

$$
1, 1, 2, 3, 2, 3, 4, 5, 6, 7, 4, 5, 6, 7, 8
$$

There are no formulas for $b_1(n)$ and $b_2(n)$ in the OEIS, so after a little inspection I conjecture that

$$
c(n) = 2^{\ell(n+1)-1} + (n+1)\operatorname{mod}2^{\ell(n+1)-1}, \\
b_1(n) = \frac{c(n)}{2^{\operatorname{tr}(c(n))}}, \\
b_2(n) = 2\operatorname{tr}(c(n)) + \left\lfloor\frac{n+1}{2^{\ell(n+1)-1}}\right\rfloor + \ell(b_1(n)) - 1
$$


----------


**UPD**: I guess my conjecture can be simplified to

$$
a(n) = c(n)2^{\ell(n+1) + [(n+1) \geqslant 3\cdot2^{\ell(n+1)-1}]} + 1
$$

Here square bracket denotes [Iverson bracket][6].


----------


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

    isok(n) = if(n % 2 && n > 1, my(A = 2^valuation(n-1, 2)); A > (n-1)/A)
    a(n) = my(L = logint(n+1, 2), A = 2^(L-1), B = A + (n+1)%A, C = valuation(B, 2)); B = B/2^C; B * 2^(2*C + (n+1)\A + logint(B, 2) - 1) + 1
    a1(n) = n++; my(L = logint(n, 2), A = 2^(L-1)); (A + n % A) * A * 2^(bittest(n, L-1) + 1) + 1
    my(z=1); for(k=1,299, while(!(isok(z)), z++); print(z==a1(k)); z++;);

Is there a way to prove it?


  [1]: https://oeis.org/A080075
  [2]: https://oeis.org/A007814
  [3]: https://oeis.org/A157892
  [4]: https://oeis.org/A157893
  [5]: https://oeis.org/A162751
  [6]: https://en.wikipedia.org/wiki/Iverson_bracket