Any deducible pattern in this sequence? Is it related to primes?

50 Views Asked by At

Here's a part of a sequence that I want to understand better:

$S=\{0,0,1,1,2,2,3,2,4,3,4,3,5,4,5,4,6,5,7,5,8,5,7,5,8,7,...\}.$

The sequence comes from finding distinct values for $f_n(x)$ where, $$ f_n(x)=\pi(x)\pi(n-x) $$

for each $n,$ where $\pi(x)$ is the prime counting function.

Related:What is the growth rate of $h(n)?$

Some observations:

The sequence is $\le\pi(x),$ and the majority of the terms seem to be strictly less than $\pi(x).$

It oscillates up and down after the first $6$ terms. Generally it increases, but slowly. The differences between terms are:

$D=\{0,1,0,1,0,1,-1,2,-1,1,-1,2,-1,1,-1,2,-1,2,-2,3,-3,2,-2,3,-1,...\}. $

Also the oscillations seem to increase as the sequence goes on as can be seen from the differences.

The sequence always increases from odd to even $n.$ It's non-increasing from even to odd $n.$ It's non-decreasing between successive primes. It's non-decreasing between successive twin primes.

What else can I analyze to understand this sequence better?

Q: Any deducible pattern in this sequence? Is it related to primes?