All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Numbers
20 numbers and 8 primes (Posted on 2006-10-12) Difficulty: 4 of 5
I am looking for n consecutive integers such that (i) every number in the sequence is divisible by a prime <=n and (ii) every prime number <=n is a factor of at least two of the numbers. For example, consider n=3:
a) There are two primes less than or equal to 3. They are 2 and 3.
b) 6 7 8 does not work, in part because 7 is not evenly divisible by either 2 or 3
c) 8 9 10 does not work, even though all are divisible by 2 or 3, because 3 divides only one of them

There is some reason to believe that no sequence of positive integers works for n < 20. For n = 20:

1) What is the first sequence of 20 consecutive positive integers that works?
2) What is the second?
3) How often do they repeat after that?
4) What interesting number results if you add the first integer from one of the first two sequences to the last integer of the other?

By the way, this problem grew out of JLo's innocent perplexus problem "Six numbers and a prime"

See The Solution Submitted by Steve Herman    
Rating: 4.5000 (2 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Hints/Tips program exploration (spoiler?) | Comment 1 of 7

  10   N=20
  15   dim Ctp(N),Cti(N)
  20   Strt=N
  30   while 1=1
  32     Nxp=nxtprm(Strt)
  34     while Nxp<Strt+N
  36        Strt=nxtprm(Strt)+1:Nxp=nxtprm(Strt)
  38     wend
  40     for I=0 to N:Ctp(I)=0:Cti(I)=0:next:Good=1:Pr=2
  50     while Pr<=N
  60      for I=Strt to Strt+N-1
  70         if I@Pr=0 then Ctp(Pr)=Ctp(Pr)+1:Cti(I-Strt)=Cti(I-Strt)+1
  80      next I
  85      Pr=nxtprm(Pr)
  90     wend
 100     for I=Strt to Strt+N-1
 110       if Cti(I-Strt)=0 then Good=0:cancel for:goto 140
 113     next I
 116     for I=2 to N
 120       if prmdiv(I)=I then if Ctp(I)<2 then Good=0:cancel for:goto 140
 130     next I
 140     if Good=1 then print Strt
 145     Strt=Strt+1
 150   wend

finds

260813
771324
1360457
1870968
1954131
2464642

where the number shown is the first of the 20 consecutive integers.

The differences between them don't seem to be consistent.

Edited on October 12, 2006, 2:17 pm
  Posted by Charlie on 2006-10-12 14:07:27

Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (2)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2017 by Animus Pactum Consulting. All rights reserved. Privacy Information