Help finding the formula for this sequence {$23$, $114$, $187$, $473$, $2792$, $5624$, $19640$, $75884$, $187211$, $479798$, $1452835$, $5102237$…}

pisequences-and-series

Excuse the large title (The 'good title' page said not to be afraid to make it too long)

$\{23,114,187,473,2792,5624,19640,75884,187211,479797,1452795,5102858,14872865,72392867,146262888\}$

I'm trying to figure out the nth term for these numbers. To help:

  • I'm generating these numbers on a python program:

    import math
    n=23
    digit=0
    while(True):
        pi=n*math.sin(math.radians(((90*n)-180)/(n)))*math.sin(math.radians(180/n))
        strpi=str(pi)
        count1=2
        while(count1<len(strpi)-1):
            if(strpi[count1]==str(math.pi)[count1]):
                if(digit<count1):
                    print(n,"\n\n",pi,"\n")
                    digit=count1
            else:
                break
            count1+=1
        n+=1
    
  • For the non-programmers the program uses this formula:

    $ π=n \cdot \sin(\frac{90n-180}{n}) \cdot \sin(\frac{180}{n})$

    What this does is calculate $\pi$ more accurately the higher the value of $n$. The program
    recorded the value of $n$ each time the next decimal value of $\pi$ was found (increasing $n$ by $1$ starting from $0$ each time). So if $n$ is $23$ the
    output is $3.1$ and if it is $114$ the value is is $3.14$. Note that these values have
    decimal places after them that are not digits of $\pi$. And this is in degrees, not radians.

  • This formula is derived from this one (Done with the sine rule):

    $ A=nr^2 \cdot \sin(\frac{90n-180}{n}) \cdot \sin(\frac{180}{n})$

    $A=$ The area of a proper polygon, $r=$ length from centre to corner, $n=$ number of sides

I substituted $A$ with $πr^2$ and simplified

  • It took me a while to realise that the difference between the first two values is larger than the difference between the second and third ($91$ then $73$)

  • If my program gets a new value I'll be adding it in. And if you want me to create an algorithm to find different data relating to this to help you solve it, or have an improved program do not hesitate to ask/suggest.

  • Technically speaking, the first element could be labelled as $12$ which gives the first digit as $3$.

  • Below are the pi values given when n is increased

enter image description here

  • Here is a GIF showing the increase of numbers as $n$ increases
    enter image description here

Best Answer

As Jean-Claude Arbaut says, you are approximating $\pi$ with $\frac n2\sin \frac {2\pi}n$. For $n$ large the argument of $\sin$ is small and we can use the Taylor series. You are then computing $\pi-\frac n{12}\left(\frac {2\pi}n\right)^3+O(\frac 1{n^4})$ The alternating series theorem says that the error of truncation is of the same sign as the first ignored term and smaller than it. You are looking for the times when the error gets smaller than the digits of $\pi$ starting somewhere. For your first example, you need the error to be less than $0.04159265\ldots$. The small gap between $114$ and $187$ comes because that digit of $\pi$ is $1$. I am sure there is no easy way to compute the exact terms because they depend on the remainder after some number of digits, which can vary over a wide range. We can ask when $\frac n{12}\left(\frac {2\pi}n\right)^3 \lt 10^{-k}$, which comes when $n\gt \left(\frac{12\cdot 10^k}{8\pi^3}\right)^{1/3}$ and we would expect terms to be roughly multiplied by $\sqrt {10} \approx 3.162$

Added: I plotted $n$, the number of correct decimals, vs $\log_{10}a(n)$ where $a(n)$ is the $n^{th}$ term from the sequence above. It forms a reasonable straight line with formula $\log_{10}a(n)\approx 0.9225+0.4806n$. I suspect with more terms in the sequence it would converge on $\log_{10}a(n)=1+\frac n2$ A plot is below enter image description here

Related Question