Finding an integer (if one exists) $n$ such that $n$, $n+1$, $n+2$, $n+3$, $n+4$ are all composite

449 Views Asked by At

I started off by thinking I would have to work $\bmod 24$ (as $24=1\cdot2\cdot3\cdot4$)

But I then decided to multiply all of the terms together, and have ended up with a rather large expression. I'm not really sure how to approach this question, if anyone could give me some guidance?

[I didn't know if maybe there was a theorem to do with primes being a certain distance apart that I may have overlooked?]

7

There are 7 best solutions below

0
On BEST ANSWER

As pointed out in these many solutions, for $n=m!$, $n+k$ are all composites for $2\le k\le m$. I just want to add another point. If we choose $n$ to be of the form $p-1$ where $p$ is a prime, then by Wilson's lemma, $n!+1$ is also composite with $n+1$ as a divisor.

2
On

Hint: Choose $n$ such that $n = m!$. Then we only need to verify $m!+1$ is positive. This way, we can say $m!+2, \cdots, m!+m$ are all composite.

0
On

All $a-1$ integers in the interval $$[a!+2,a!+a]$$ are composite. because you need to find 5 consecutive numbers, Put $a-1=5$, then $n=6!+2$ is a solution.

1
On

The other answers have already remarked that $m! +k $ is composite for $2 \leq k \leq m,$ whenever $2 \leq k \leq m$ and $m \geq 2.$ The reason for this, is that $m!$ is clearly by each of $2,3,\ldots,m-1,m$ by definition of the factorial. Hence $m!+k$ is divisible by $k$ for $2 \leq k \leq m.$ On the other hand, $m!+k$ is clearly strictly greater than $k,$ so we must conclude that $m!+k$ is not prime, hence is composite, for each such $k.$ This is a fairly well-known method for showing that there are arbitrarily long sequences of consecutive composite numbers. In the case of this problem, we can see that $6! + 2, 6!+3, 6!+4, 6!+5$ and $6!+6$ are all composite, so taking $n = 6!+2$ gives one possible choice of $n$ (though not the smallest choice possible). While this general method does not usually give the smallest possible choice of $n,$ it is systematic, and does produce as long a sequence of consecutive composite numbers as needed.

0
On

One may typically take the starting point of a long sequence of consecutive composite as smaller than the $m! + k$ recipe, as Geoff Robinson mentions. To be specific, to find the earliest occurrence of $2w - 1$ consecutive composite numbers, find the first place in the table below where the prime gap $g \geq 2w.$ The consecutive composites begin with $p+1$ and end with $p+g-1,$ where $p$ is the prime in the table. So, for example, the first occurrence of 7 consecutive composite numbers starts at $89 + 1 = 90,$ so is $90,91,92,93,94,95,96.$ The primes that are bookends for this are 89 and 97. The final column relates to conjectures of Cramer and Granville on prime gaps. So, with this table, we can get up to 1475 consecutive composite numbers. I found this table as a link off http://en.wikipedia.org/wiki/Prime_gap then computed the final column in C++.

Stolen from 
http://users.cybercity.dk/~dsl522332/math/primegaps/maximal.htm

Evidently this is up to date, see http://oeis.org/A005250 and links there including http://oeis.org/A005250/b005250.txt 



the size of the gap is g

next are the number of decimal digits in p

as you can see, for $$ 4 \cdot 10^{18} > p \geq 23, \; \; \; \; g \, < \, \log^2 p = (\log p)^2.$$

Oh, logarithms base $e \approx 2.718281828459.$


    ==================================
             g   digits of p             p    log p   g/log p  g/log^2 p
      1      1   1                        2 0.693147   1.4427    2.08137
      2      2   1                        3  1.09861  1.82048    1.65707
      3      4   1                        7  1.94591  2.05559    1.05637
      4      6   2                       23  3.13549  1.91357   0.610294
      5      8   2                       89  4.48864  1.78228   0.397065
      6     14   3                      113  4.72739  2.96147   0.626449
      7     18   3                      523  6.25958  2.87559    0.45939
      8     20   3                      887  6.78784  2.94644   0.434076
      9     22   4                     1129  7.02909  3.12985   0.445271
     10     34   4                     1327  7.19068  4.72835   0.657566
     11     36   4                     9551   9.1644  3.92824   0.428642
     12     44   5                    15683  9.66033  4.55471   0.471486
     13     52   5                    19609  9.88374  5.26116   0.532305
     14     72   5                    31397  10.3545  6.95352   0.671548
     15     86   6                   155921  11.9571  7.19238   0.601515
     16     96   6                   360653  12.7957  7.50254   0.586334
     17    112   6                   370261   12.822  8.73501   0.681254
     18    114   6                   492113  13.1065    8.698   0.663642
     19    118   7                  1349533  14.1153  8.35974   0.592248
     20    132   7                  1357201  14.1209  9.34782   0.661983
     21    148   7                  2010733   14.514   10.197   0.702566
     22    154   7                  4652353  15.3529  10.0307   0.653342
     23    180   8                 17051707  16.6518  10.8097   0.649161
     24    210   8                 20831323   16.852  12.4615   0.739466
     25    220   8                 47326693  17.6726  12.4487   0.704405
     26    222   9                122164747  18.6209  11.9221   0.640254
     27    234   9                189695659  19.0609  12.2764   0.644062
     28    248   9                191912783  19.0726   13.003   0.681764
     29    250   9                387096133  19.7742  12.6427   0.639356
     30    282   9                436273009  19.8938  14.1753   0.712549
     31    288  10               1294268491  20.9812  13.7266   0.654231
     32    292  10               1453168141   21.097  13.8408   0.656056
     33    320  10               2300942549  21.5566  14.8447   0.688637
     34    336  10               3842610773  22.0694  15.2247   0.689855
     35    354  10               4302407359  22.1824  15.9586   0.719423
     36    382  11              10726904659   23.096  16.5396   0.716125
     37    384  11              20678048297  23.7523  16.1668   0.680642
     38    394  11              22367084959  23.8309  16.5332   0.693772
     39    456  11              25056082087  23.9444  19.0441   0.795349
     40    464  11              42652618343  24.4764  18.9571   0.774506
     41    468  12             127976334671  25.5751   18.299   0.715502
     42    474  12             182226896239  25.9285   18.281   0.705055
     43    486  12             241160624143  26.2087  18.5434   0.707529
     44    490  12             297501075799  26.4187  18.5475   0.702059
     45    500  12             303371455241  26.4382   18.912   0.715328
     46    514  12             304599508537  26.4423  19.4386   0.735133
     47    516  12             416608695821  26.7554  19.2858   0.720819
     48    532  12             461690510011  26.8582  19.8078   0.737495
     49    534  12             614487453523  27.1441  19.6728   0.724756
     50    540  12             738832927927  27.3283  19.7597   0.723048
     51    582  13            1346294310749  27.9284   20.839   0.746159
     52    588  13            1408695493609  27.9737  21.0198   0.751412
     53    602  13            1968188556461  28.3081   21.266   0.751232
     54    652  13            2614941710599  28.5923  22.8034   0.797536
     55    674  13            7177162611713  29.6019  22.7688   0.769166
     56    716  14           13829048559701  30.2578  23.6633   0.782057
     57    766  14           19581334192423  30.6056  25.0281   0.817762
     58    778  14           42842283925351  31.3885  24.7861   0.789655
     59    804  14           90874329411493  32.1405  25.0152   0.778307
     60    806  15          171231342420521   32.774  24.5926   0.750369
     61    906  15          218209405436543  33.0165  27.4408   0.831126
     62    916  16         1189459969825483  34.7123  26.3884   0.760203
     63    924  16         1686994940955803  35.0617  26.3535   0.751632
     64   1132  16         1693182318746371  35.0654  32.2825   0.920639
     65   1184  17        43841547845541059  38.3194  30.8982   0.806335
     66   1198  17        55350776431903243  38.5525  31.0745   0.806032
     67   1220  17        80873624627234849  38.9317   31.337   0.804922
     68   1224  18       203986478517455989  39.8568  30.7099   0.770506
     69   1248  18       218034721194214273  39.9234  31.2598   0.782995
     70   1272  18       305405826521087869  40.2604  31.5943   0.784749
     71   1328  18       352521223451364323  40.4039  32.8681   0.813489
     72   1356  18       401429925999153707  40.5338  33.4536   0.825325
     73   1370  18       418032645936712127  40.5743  33.7652   0.832181
     74   1442  18       804212830686677669  41.2286  34.9757   0.848335
     75   1476  19      1425172824437699411  41.8008  35.3103   0.844728
           g   digits of p             p     log p    g/log p  g/log^2 p
    ==================================

2
On

For a much smaller number than $n!$, choose the product of all the primes $n$ or less. By the prime number theorem, this is about $e^n$ (from Chebychev's $\theta$ and $\psi$ functions).

0
On

Most of the answers so far have relied on the factorial function, so I thought I'd try something a little different. The goal is the same: show that there are infinitely many cases of five consecutive composite numbers.

Suppose the opposite, i.e., that every stretch of five consecutive "large" numbers contains at least one prime. Then starting from any large prime $p$, the next prime is either $p+2$ or $p+4$, since $p+1$, $p+3$ and $p+5$ are all even. Hence the sequence of differences between prime numbers eventually settles into a string of $2$'s and $4$'s (which we know, of course, not to be the case, but let's set that aside and prove it can't be the case). This eventual sequence cannot have two consecutive $2$'s, since one of $p$, $p+2$, and $p+4$ must be divisible by $3$, and likewise (for the same reason) it does not have two consecutive $4$'s. Thus the sequence of differences eventually alternates $...,2,4,2,4,2,4,....$ This implies $p$, $p+6$, $p+12$, $p+18$, and $p+24$ are all primes. But one of these is divisible by $5$, since they are equivalent to $p$, $p+1$, $p+2$, $p+3$, and $p+4$ mod $5$. And there's our contradiction.

Added later: It occurs to me the argument above proves a little theorem: Any interval of the form $[p,p+24]$ where $p$ is a prime greater than $3$ necessarily contains a string of five consecutive composite numbers. In fact, a more careful analysis leads to a stronger statement:

Any interval of the form $[n,n+25]$ with $n\ge3$ contains a string of five consecutive composite numbers.

On the other hand, we also have:

An interval of the form $[p-4,p+20]$ contains no string of five consecutive composite numbers if $p$, $p+4$, $p+6$, $p+10$, $p+12$, and $p+16$ are all prime numbers.

The OEIS sequence $7, 97, 16057, 19417,\ldots$ gives the first few values for such primes $p$. The general prime $k$-tuple conjecture implies there are infinitely many such primes.