0

This is a question from a math contest. I want to know if my proof is correct or do I need to add more elements. No answers needed?

Any positive integer can be written in binary (also called base 2). For example, $37$ is $100101$ in binary (because $37 = 2^5 + 2^2 + 2^0$), and $45$ is $101101$ in binary.

Let’s say that a positive integer is "scattered" if, in its binary expansion, there are never two ones immediately next to each other. For example, $37$ is scattered but $45$ is not.

How many scattered numbers are there less than $4$? Less than $8$? Less than $2^n$?

Here is my proof:

First, we see the scattered numbers below $4$ and $8$, as they are not very big numbers, we write a list of them and find out the scattered numbers:
$$0 = 000_2$$$$1=001_2$$$$2=010_2$$$$3 = 011_2$$ $$4=100_2$$$$5=101_2$$$$6=110_2$$$$7=111_2$$$$8=1000_2$$
If we count $0$, we see there are $3$ scattered numbers less than $4$ and $5$ less than $8$.
We see that numbers from $4$ to $7$ are just extensions of the number from $0$ to $3$ with just a ‘$1$’ added in the front. Eg – $0$ is $000$ in base $2$ and $4$ is $100$ in base $2$, so we add a $1$ in the front.
So there are as many scattered numbers from $4$ to $7$ as there are from $0$ to $3$.
We see there are $8$ scattered numbers less than $16$.

So we see a pattern here:
Define $S(x)$ as the number of 'scattered numbers' less than $x$.
We conjecture: $$S(2^n) = S(2^{n-1})+S(2^{n-2})$$

D S
  • 4,961
  • 8
    Welcome to MSE. Please try to make your question self-contained. – José Carlos Santos Jan 11 '23 at 07:44
  • 5
    Welcome to Math.SE! ... Please include the content of your proof in the body of the question. People may be (reasonably) reluctant to click on an arbitrary URL. ... Also, please provide the source of this question, to assure readers that it's not from an on-going contest. – Blue Jan 11 '23 at 08:14
  • Maybe you could count all the finite subsets of ${0,1,\ldots, k}$ that have no consecutive elements, similar to what was done here, for each $k\in\Bbb N$? – PinkyWay Jan 11 '23 at 08:15
  • 2
    I have answered the same question here: https://math.stackexchange.com/a/4598539/1088689 – D S Jan 11 '23 at 10:58
  • 1
    I think your proof is incomplete as you only conjecture the 'pattern' but do not prove the claim – D S Jan 11 '23 at 10:59
  • thank you @D S. – Pulkit Sabharwal Jan 12 '23 at 03:53

0 Answers0