Is there a well known function which has $7, 8, 21$ among its first values?

80 Views Asked by At

In other words, function similar to the exponential one or Gamma or anything that has $7, 8, 21$ in its first values (not necessarily $7$ for $x = 1$), but say like:

$f(x) = 7; $

$f(x + 1) = 8;$

$f(x + 2) = 21;$

where $x$ is natural number, ideally the function should give such results as above for the first numbers: $\{1, \ldots, 10\}$.

Also: the function also produces only natural numbers and other primes, not just $7$.

1

There are 1 best solutions below

0
On

The On-Line Encyclopedia of Integer Sequences (OEIS) does give almost forty results for the search 7, 8, 21, but you did say "well known." This suggests you want what the OEIS calls a "core" sequence. I amend my search to 7, 8, 21 keyword:core and... get no results at all.

What about a "nice" sequence? I try 7, 8, 21 keyword:nice and get only one result: numbers $N$ such that $$2^N - 1 - \sum_{\textrm{prime } p < N} 2^p$$ is prime. For example, $2^7 - 1 - (2^2 + 2^3 + 2^5) = 128 - 1 - (4 + 8 + 32) = 127 - 44 = 83$. Does that do it for you?