3

Let $x\ge0$ and $x\in\Bbb Z$. I wrote function $a(x)$ that for $x\ge1$ returns prime $\ge7$ or composite of these primes, and for $x=0$ it returns 5 $$a(x) = \frac{9+6(x+\lfloor\frac{\vert x-1\vert}{8}\rfloor+\lfloor\frac{x+1}{8}\rfloor)+(-1)^{x+\lfloor\frac{\vert x-1\vert}{8}\rfloor+\lfloor\frac{x+1}{8}\rfloor}}{2}$$ Then I created formula that finds positions of composite numbers within $a(x)$, where k are positions of numbers within $a(x)$ $$c(x,k)=2a(k)-\lfloor\frac{k}{2}\rfloor-1+(a(k)+\lfloor\frac{k+6}{8}\rfloor+\lfloor\frac{k+2}{8}\rfloor)(\lfloor\frac{x+6}{8}\rfloor+\lfloor\frac{x+2}{8}\rfloor)+(\frac{1}{2}a(k)+\frac{1}{2}+\lfloor\frac{k}{8}\rfloor)(\lfloor\frac{x+5}{8}\rfloor+\lfloor\frac{x+3}{8}\rfloor)+(a(k)+2\lfloor\frac{k+4}{8}\rfloor)\lfloor\frac{x+4}{8}\rfloor+(2a(k)-\lfloor\frac{k}{2}\rfloor-k-1)(\lfloor\frac{x+1}{8}\rfloor+\lfloor\frac{\vert x-1\vert}{8}\rfloor)+(2k+1)\lfloor\frac{x}{8}\rfloor$$ I used these positions to create function s(x) that returns 1 for a prime and 0 for composite number $$s(x)=\vert\text{sgn}(\sum_{k=1}^{q(x)}\sum_{j=0}^7\frac{\vert\lfloor\frac{x+8a(k)-c(k+j,k)}{8a(k)}\rfloor\vert+\lfloor\frac{x+8a(k)-c(k+j,k)}{8a(k)}\rfloor}{2}-\frac{\vert\lfloor\frac{x+8a(k)-c(k+j,k)-1}{8a(k)}\rfloor\vert+\lfloor\frac{x+8a(k)-c(k+j,k)-1}{8a(k)}\rfloor}{2})-1\vert$$ Where $q(x)$ is a function thet gives good approximation to $c(x,x)$ ploted on x-axis, against $x$ ploted on y-axis $$q(x)=\lceil\frac{(\log(x+1))^{\frac{1}{2}}+7(x+1)^{\frac{1}{2}}}{13}\rceil$$ Exemples of $q(x)$ values: $q(10)=2$, $q(10^2)=6$, $q(10^3)=18$, $q(10^4)=55$, $q(10^5)=171$, $q(10^6)=539$, $q(10^7)=1704$

Then I modified function a(x) with s(x), to finally get $$p(x) = \frac{9+6(x*s(x)+\lfloor\frac{\vert x*s(x)-1\vert}{8}\rfloor+\lfloor\frac{x*s(x)+1}{8}\rfloor)+(-1)^{x*s(x)+\lfloor\frac{\vert x*s(x)-1\vert}{8}\rfloor+\lfloor\frac{x*s(x)+1}{8}\rfloor}}{2}$$ This function returns primes and replaces composite numbers with 5.

Now I return to question from the title: Is this formula good enough to write article about it, or not really worth it, because it's too convoluted, require too many calculations or isn't really helpful?

ptbil
  • 39
  • 5
    "a(x) that for x≥1 returns prime ≥7 or composite of these primes". I don't think that is a very special property to have. For example $a(n)=30n+1$ does the same thing. Simply any formula that cannot be a multiple of 2, 3, or 5 works. – Jaap Scherphuis Feb 13 '23 at 12:28
  • 3
    As for the rest of your work, assuming it is correct, it seems to me a bit like Willans' formula. It shows off a clever construction method, shows how a particular set of simple tools is powerful enough to construct a particular complicated thing, but it is not useful in practice. – Jaap Scherphuis Feb 13 '23 at 12:39
  • 1
    A prime formula would only be useful in practice , if we could efficiently find ANY new prime number with sufficient magnitude, say some random prime with $50$ digits. The formula here seems to be far too inefficient to deliver this. Neither seems the idea to be anything really new. The answer is therefore clear : "Not good enough for an article". – Peter Feb 13 '23 at 13:14
  • Thank you for your comments. I thought it wosn't good enough and now I'm sure. – ptbil Feb 15 '23 at 11:15
  • @JaapScherphuis You're right, a(x) isn't special and can be replaced with any equivalent formula. I described it that way in context of what I was doing further. I tested this prime formula against list of first 10000 primes. – ptbil Feb 15 '23 at 11:55
  • @JaapScherphuis It turned out a bit like Willans' formula, but initially I wanted to make n-th prime formula, where $s(x)$ return value that represent number of composite numbers at $x$ and below, and composite numbers above $x$ till next prime $$s(x)=\sum_{k=1}^{q(x)}\sum_{j=0}^7\frac{\vert\lfloor\frac{x+8a(k)-c(k+j,k)+k-1}{8a(k)}\rfloor\vert+\lfloor\frac{x+8a(k)-c(k+j,k)+k-1}{8a(k)}\rfloor}{2}$$ Unfortunately I couldn't successfully integrate it within formula to find next prime. – ptbil Feb 15 '23 at 11:55

0 Answers0