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"
(In reply to
Confessions and a new problem, thanks to Charlie by Steve Herman)
I tried up to n=9 by manually changing n in the program and didn't get any results after many iterations.
Then I modified the program to increase n after checking up to 1 million as the start of the sequence. At n=18 it finds something:
10 :
11 :
12 :
13 :
14 :
15 :
16 :
17 :
18 :
27829
87890
422603
482664
538339
598400
933113
993174
so there are values for n=18.
10 for N=10 to 18:print N;":"
15 dim Ctp(N),Cti(N)
20 Strt=N-1
30 while Strt<1000000
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
155 erase Cti(),Ctp()
160 next N
|
Posted by Charlie
on 2006-10-12 15:48:47 |