1
$\begingroup$

I was able to prove that $$\pi(x)=\sum_{k=2}^x\left(\left\lfloor\frac{2^k-2}k\right\rfloor-\left\lfloor\frac{2^k-3}k\right\rfloor\right)\tag{1}$$(Where $\pi(x)$ is the number of primes less than or equal to $x$). Using Fermat's little theorem and that$$\left\lfloor \frac ab\right\rfloor-\left\lfloor \frac {a-1}b\right\rfloor$$Is $1$ if $b\mid a$ and $0$ otherwise. This was in inspiration from this link, specifically the one titled as "Mináč formula," where I improved on his. So I am wondering if $(1)$ is new, and if so is it worth being published? I have seen many papers with formulae that Desmos couldn't even calculate past $x=1$, while $(1)$ is computable to past $x=50$. But For practical purposes, $(1)$ couldn't be used as a sort of "Chudnovsky algorithm".

$\endgroup$
3
  • 7
    $\begingroup$ @KamalSaleh I didn't downvote, but FWIW here's a possible reason someone may have. If I understand your proposed formula correctly, I believe you haven't accounted for Fermat pseudoprimes (i.e., composite numbers $n$ which act like prime numbers in that $a^{n-1} \equiv 0\pmod{n}$). In particular, for base $2$, these are called "Sarrus numbers" (or "Poulet numbers"). The smallest such number is $341$, with a partial list of these and some other details in OEIS A001567. $\endgroup$ Apr 23 at 0:14
  • 7
    $\begingroup$ And indeed the formula fails at $x=341$. $\endgroup$
    – Servaes
    Apr 23 at 0:17
  • 5
    $\begingroup$ I didn't downvote either, but in addition to the Fermat primality testing issue (which seems to ruin your approach), checking divisibility using floors like that seems like just a workaround for your software's lack of a straightforward way to work with integers and test divisibility. You are doing fun explorations of topics you're still learning and getting way ahead of yourself thinking you're close to any publishable discovery. $\endgroup$
    – Karl
    Apr 23 at 0:29

1 Answer 1

4
$\begingroup$

You have "proved" an incorrect statement. The first discrepancy occurs at $n = 342$: Mathematica finds that $$\sum_{k=2}^{342} \left( \left\lfloor \frac{2^k-2}{k} \right\rfloor - \left\lfloor \frac{2^k-3}{k} \right\rfloor \right) = 69$$ while $\pi(342) = 68$. By the time you get to $n = 1000$, the floor function formula gives 171 while $\pi(1000) = 157$. By $n = 10000$, the discrepancy is $1251-1229 = 22$.

$\endgroup$
1
  • 5
    $\begingroup$ The comment of John Omielan explains why your formula is off. Following up on Karl's comment, you might invest time in learning Sage or some other mathematics software to explore conjectures more thoroughly than Desmos allows (going to $n=50$ is far from compelling). $\endgroup$ Apr 23 at 1:10

You must log in to answer this question.

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