2
$\begingroup$

Let $f(n)$ = 1 if $n$ belongs to A014689, $\operatorname{prime}(n)-n$, the number of nonprimes less than $\operatorname{prime}(n)$. Here $\operatorname{prime}(n)$ is the $n$-th prime number, $\operatorname{prime}(1)=2$.

Let $a(n)$ be the $n$-th composite numbers, $a(1)=4$.

Then I conjecture that

$$a(n) = 1 + a(n-1) + f(n)$$

Is there a way to prove it?

$\endgroup$
2
  • 3
    $\begingroup$ You have only defined $f(n)$ if $n$ belongs to a certain sequence. What is $f(n)$ if $n$ doesn't belong to that sequence? $\endgroup$ Commented Dec 21, 2021 at 22:36
  • 3
    $\begingroup$ @GerryMyerson Clearly, the OP had in mind that $f(n)=0$ if $n$ does not belong to the sequence. Indeed, with this supplemented definition, the conjecture is true. See my response below. $\endgroup$
    – GH from MO
    Commented Dec 21, 2021 at 22:50

1 Answer 1

8
$\begingroup$

Surely $f(n)$ is meant to be the indicator function of the range of the function $k\mapsto p(k)-k$, where $p(k)$ denotes the $k$-th prime number. With this supplemented definition, the conjecture is true.

Indeed, $n=p(k)-k$ holds if and only if there are $n-1$ composite numbers up to $p(k)$, that is, $a(n-1)<p(k)<a(n)$. Therefore, $f(n)=1$ means that there is a prime number between $a(n-1)$ and $a(n)$. So we have $a(n)=a(n-1)+2$ when $f(n)=1$, and we have $a(n)=a(n-1)+1$ when $f(n)=0$.

$\endgroup$
2
  • $\begingroup$ Hello! Thank you for answer! Can I ask about a similar case? Let $g(n) = m$ with $m>0$ if $n$ belongs to A073169 ($\operatorname{composite}(n)-n$) where $m$ is the number of repetitions of $n$ in A073169. Let $b(n)$ be the $n$-th prime number, $b(1)=2$. Then I conjecture that $b(n) = 1 + b(n-1) + g(n)$. I also conjecture that this rule works for any complement sequences. Is there a way to prove it? $\endgroup$ Commented Dec 24, 2021 at 15:21
  • 2
    $\begingroup$ @Notamathematician For a new question please open a new post. $\endgroup$
    – GH from MO
    Commented Dec 24, 2021 at 15:47

You must log in to answer this question.

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