0
$\begingroup$

Let $a(n)$ be A339970 = A329697$($A019565$(2n))$: the sequence begins with $$0, 1, 1, 2, 2, 3, 3, 4, 2, 3, 3, 4, 4, 5, 5, 6, 2, 3, 3, 4, 4$$ Also let's consider $$\ell(n)=\left\lfloor\log_{2}(n)\right\rfloor$$ and $$T(n,k)=\left\lfloor\frac{n}{2^k}\right\rfloor\operatorname{mod}2$$ Here $T(n,k)$ is the $(k+1)$-th bit from the right side in binary expansion of $n$.

Then we have an integer sequence given by $$b(n)=\sum\limits_{k=0}^{\ell(n)}\sum\limits_{j=0}^{\ell(n)-k}(-1)^{k}(j+1)T(n,j+k)$$ The sequence begins with $$1, 1, 2, 2, 3, 3, 4, 2, 3, 3, 4, 4, 5, 5, 6, 3, 4, 4, 5, 5$$

Let $c(n)=b(n)-a(n)$. Here $c(0)=0$.

I conjecture that for $n\geqslant0$, $0 < k < 16$ we have $$a(16n+k)=b(16n+k)-c(16n)$$

Is there a way to prove it?

$\endgroup$

1 Answer 1

3
$\begingroup$

In this answer, $\wedge$ denotes bitwise AND and $[\;]$ are Iverson brackets.

$$b(n) = \sum_{k \ge 0} \sum_{j \ge 0} (-1)^{k}(j+1) [n \wedge 2^{j+k}] = \sum_{e \ge 0}[n \wedge 2^e] \sum_{j=0}^e (-1)^{e-j} (j+1) = \sum_{e \ge 0}[n \wedge 2^e] \left(1 + \left\lfloor \frac{e}{2} \right\rfloor\right)$$

so that if $x \wedge y = 0$, $b(x + y) = b(x) + b(y)$.


$c$ just serves to muddy the waters: the conjecture is that for $n \ge 0$, $0 \le k < 16$, $$a(16n+k)-a(16n)=b(16n+k)-b(16n)$$

But clearly $(16n) \wedge k = 0$, so the conjecture reduces to $$a(16n+k)-a(16n)=b(k)$$


OEIS states

If 4n = 2^e1 + 2^e2 + ... + 2^ek [e1 ... ek distinct], then a(n) = A329697(A000040(e1)) + A329697(A000040(e2)) + ... + A329697(A000040(ek)).

In particular, since this is again given by a linear function over the bit values, if $x \wedge y = 0$, $a(x+y) = a(x) + a(y)$. So the conjecture reduces to:

If $0 \le k < 16$, $a(k) = b(k)$

which is easily checked.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .