A simple unsolved problem

Are there infinitely many positive integers n such that tan(n) > n?

David P. Bellamy and Felix Lazebnik [1] asked in 1998 whether there were infinitely many solutions to |tan(n)| > n and tan(n) > n/4. In both cases the answer is yes. But at least as recently as 2014 the problem at the top of the page was still open [2].

It seems that tan(n) is not often greater than n. There are only five instances for n less than one billion:


In fact, there are no more solutions if you search up to over two billion as the following C code shows.

    #include <math.h>
    #include <stdio.h>
    #include <limits.h>

    int main() {
       for (int n = 0; n < INT_MAX; n++) 
          if (tan(n) > n)
             printf("%d\n", n);

If there are infinitely many solutions, it would be interesting to know how dense they are.

Update: The known numbers for which tan(n) > n are listed in OEIS sequence A249836. According to the OEIS site it is still unknown whether the complete list is finite or infinite.


[1] David P. Bellamy, Felix Lazebnik, and Jeffrey C. Lagarias, Problem E10656: On the number of positive integer solutions of tan(n) > n, Amer. Math. Monthly 105 (1998) 366.

[2] Felix Lazebnik. Surprises. Mathematics Magazine , Vol. 87, No. 3 (June 2014), pp. 212-22

8 thoughts on “A simple unsolved problem

  1. It’s probably best to formulate this as a question about how well you can approximate pi by rationals, or something like that but a bit more complicated, since tan(x) is infinite when x is near 2 pi k + pi/2 or 2 pi k – pi/2.

    A similar question for cot(x) might be simpler, since cot(x) is infinite when x is near pi k.

  2. tan(3083975227) = 13356993783.76
    So am I right? or did I hit some numerical error?
    I’m testing my thoughts and will be back with more.

  3. I have no proof that the algorithm below guarantees tan(n) > n, but it does find the two largest that John lists and adds one more.

    It is premised on working with rational convergents to pi that arise from its continued fraction. The rational convergents that work must have an even numerator, an odd denominator, and be less than pi. Here are the results.

    pi convergent 245850922/78256779
    tan(122925461) = 326900723.47

    pi convergent 1068966896/340262731
    tan(534483448) = 1914547468.53

    pi convergent 6167950454/1963319607
    tan(3083975227) = 13356993783.76

    I don’t have larger convergents at my disposal tonight.

    In the spirit of John’s recent comments about bc, here is a bc program that computes n, tan(n) and their ratio given cd which is the denominator of the convergent for pi that meets the above criteria.

    bc -l <<< 'scale = 500; k = 1; cd = 1963319607; d = ((cd * k – 1) / 2 ) * (16*a(1/5) – 4*a(1/239)); scale = 0; n = d/1 + 2; scale = 500; t = s(n)/c(n);scale=10;n;t;t/n'

    k needs to be an odd integer. Originally I thought that higher values of k should also work, but it appears that only k = 1 is good.

    The (16*a(1/5) – 4*a(1/239) is pi. The scale=0 in the middle (with the divide by 1) is to take the integer part of d. bc doesn't have a tan function so we do s(n)/c(n).

    Train of thought:

    Tangent has many branches that have zeros at m*pi and so we could look at n = m*pi + r. You can think of r as the remainder on division by pi or as the place along the x axis you would be if you shifted n down to the first branch. So for tan(n) to be large positive we want r to be just a little smaller than pi/2. So here I'll pretend I can write a little math:

    r = n – m*pi
    pi/2 – r = ϵ

    Combining those two, removing r, and replacing convergents for pi yields:

    2*m + 1 Cn
    ———- . —- – ϵ = n
    2 Cd

    Where Cn is pi convergent numerator and Cd is pi convergent denominator. We'd like the left term to be just a little bigger than an integer (if it were actually pi there). We substitute the convergent to get close. The 2 in the denominator will cancel into an even Cn. And m should be chosen from:

    m = (Cd * k – 1) / 2 with k odd

    That causes the left term to be exactly an integer, but switching back to the actual value for pi and this value for m seems to accomplish what we want. We calculate n in this way:

    n = int(m*pi) + 2 (this gets n-m*pi to be about pi/2)

    This seems to work for convergents that are a little smaller than pi because those pull things to the smaller side of pi/2. Convergents larger than pi lead to tan(n) that is a large negative (just on the bigger side of pi/2).

  4. We can make a conjecture about how the solutions are distributed based on how they would be distributed for random numbers close to each n.

    The width of the interval where tan(x) > n in each period is approximately 1/n. Hence, the probability that tan(x) > x for a random x close to a large n is approximately 1/(pi * n). We should therefore expect the number of solutions less than m to be approximately log(m) / pi. If this is not the case, it means that pi (or really pi/2) is exceptional in how close its multiples are, or are not, to integers.

  5. So I computed convergents from this list: http://oeis.org/A001203
    All the convergents that have even numerator, odd denominator, and are less than pi successfully produce n where n n

    This process skips two entries in that list.

    n 122925461
    tan(n) 326900723.47983
    n 534483448
    tan(n) 1914547468.53682
    n 3083975227
    tan(n) 13356993783.76439
    n 214112296674652
    tan(n) 3855691461342749.07760
    n 118554299812338354516058
    tan(n) 302694923193883721597712.90150
    n 1428599129020608582548671
    tan(n) 16439435717609010537922321.88458
    n 9322105473781932574489648896
    tan(n) 40338043439489624307995644624.76853
    n 1647533557310758242795542778250
    tan(n) 3781332851129826614143569782851.38783
    n 19203062276130315764031455655979057
    tan(n) 145341664535339512907321611837878173.71456
    n 231767240447593988184889934086223330
    tan(n) 805464480277747403706606666100463360.67457
    n 16132875282857518417293384808417539001172631
    tan(n) 21902235453622030161672383121109158060235583.31822
    n 378942232820064582240301274646582332037664078
    tan(n) 708432217144382628367005646704674203198647039.66028
    n 1169809367327212570704813632106852886389036911
    tan(n) 4709186030398989007843871619726545165019129271.83148
    n 22259360648084057667375368818197310731667745986
    tan(n) 81198429235569061313449854482822342871956788986.21049
    n 1531216647248491128766081193927187028939518325390
    tan(n) 2728952425907356482483375589048825878114259942997.65137
    n 4719396382295507308889802400540643563335875857787
    tan(n) 9655561421183811437387724822260174309481752200227.42664

  6. Sorry, something ate part of my previous comment. To try again.
    The second link to oeis came from this blog a couple of entries later.

    All the convergents that meet the requirements above produce a positive tangent greater than n. All the convergents which are greater than pi make a negative tangent.

  7. Eric Weisstein makes an even stronger conjecture, namely that the minimum and maximum values of tanc(n) = tan(n)/n are unbounded as n goes to infinity.

  8. I posted A249836 several years ago on OEIS, purely recreationally.
    Then last week I challenged my wife to find a prime number p such that tan(p) > p. I was fairly sure that no such a prime exists, or if it did it would have zillions (at least millions) of digits, and therefore could not be proven to be prime. Then I tried it myself. Using the list of about 500 terms of the sequence, I soon landed on this gem: 1169809367327212570704813632106852886389036911
    That is a 46 digit answer, and is the lowest prime for which tan(p) > p
    The only place that this number was found by Google was in the comment left by Phil above. So my next challenge is, find another prime such that tan(p) > p. My guess is that no such number will ever be found by humankind. Now regarding your question of whether the sequence of integers n for which tan(n) > n is finite, the consensus is that the list is infinite, and that we expect subsequent terms to increase by a factor tending to e^pi (about 23) which is confirmed as a good approximation by inspecting the first 500 terms.

Leave a Reply

Your email address will not be published. Required fields are marked *