I am trying to come up with $257$ (or $256$) consecutive integers such that each one has a prime factor $<$ $100$. Is my approach a good method?

$1.$ Choose an integer $n$ such that ($100$#) (primorial function) $|$ $n$.

$2.$ Eliminate a small factor from the set of primes less than $100$ (call this prime $p$). $p$ $|$ $n+1$.

$3.$ Eliminate all primes $q$ congruent to $1$ $\pmod p$ since $p$ $|$ $n+q$. This set is {$q, q_1,.... q_n$}.

$4.$ Choose one of these primes $q_n$ such that $q_n$ $|$ $n+1$. Eliminate all primes $s$ congruent $1$ $\pmod {q_n}$.

$5.$ Repeat this process until no more primes $<$ $100$ can be eliminated.

$6.$ For all divisors $d_n$ of $n+1$, use primes $r_n$ that do not divide $n$ or $n+1$ and make the congruence $r_n$ $|$ $n+d_n$ hold.

Example using this idea:

The $162$ consecutive integers after $1610596759123800808688936916463498913$ have a prime factor $s$ $<$ $100$. (It took me a while and multiple times I got the congruence relation wrong.)

Can someone help create a consecutive integer list $n+-k$ such that a prime less than $100$ divides each integer on the list (based on my example) that beats my record. Thanks.

Take a look at https://oeis.org/A058989 for more info on the max length for these sequences.


Is anyone willing to try and find a better result than this one:

Each of the first $209$ integers after $980048014805329352638322460936985099$ have a prime factor $s$ $>$ $100$.

  • 2
    $\begingroup$ You might want to reference the OEIS sequence and your earlier question, otherwise it is not immediately clear to everyone where did 257 come from. $\endgroup$ Dec 10, 2016 at 8:15
  • $\begingroup$ Good point. Still, would you know how to arrange the rest of the factors so my method works. $\endgroup$
    – J. Linne
    Dec 10, 2016 at 8:17
  • $\begingroup$ I'll have to think of it for a while. $\endgroup$ Dec 10, 2016 at 8:18
  • $\begingroup$ For the numbers from $n$ to $n+100$, $n+11$ appears to be the only one without a listed factor from $22$ primes. $\endgroup$
    – J. Linne
    Dec 10, 2016 at 8:24
  • 1
    $\begingroup$ @Peter I searched and found a result with 209 consecutive integers each with a prime factor less than 100, which is close to the 257 maximum limit. Number posted in question. $\endgroup$
    – J. Linne
    Dec 20, 2016 at 4:07

2 Answers 2


It took me much effort, but finally I found an approach leading to high differences! Here the result :

? q=1;while(q>0,n=Mod(0,1);z=vector(252,s,s);p=1;while(p<97,p=nextprime(p+1);mer
ent(n,2);anz=0;for(j=-20,260,if(gcd(n+j,100!)==1,anz=anz+1;print1(j," ")));print
-20 -16 -14 -10 -4 -2 256 260

The displayed number is $N$. The numbers $N-2$ and $N+256$ have no prime factor below $100$ , but all numbers between have one. So the difference is $258$. If I remember an OEIS-entry correctly, this is the maximum possible difference.


Based on A049300, each of the $232$ integers after $990578949024486399796411481983580$ have a prime factor $s<100$.

A table up to $n=24$ is available at http://oeis.org/A049300/b049300.txt


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.