A sphenic number S.N. is a product of three distinct prime numbers.
a. Clearly each S.N. has 8 divisors. Show that not only S.N.s claim this feature.
b. Find the smallest consecutive pair n,n+1 of sphenic numbers.
c. Same for the smallest triplet.
d. Prove that sphenic quadruplet n,n+1,n+2,n+3 is "mission impossible".
a) If p is a prime, p^7 has exactly eight factors: 1, p, p^2,...,p^7
b) & c - see below
d) The four-tuple cannot work since every group of 4 consecutive numbers contains a number divisible by 4 and thus has 2 as a non-distinct prime factor.
The pair is (2 5 23) (3 7 11): 230 231
The trio is (7 11 17) (2 5 131) (3 19 23): 1309 1310 1311
>ff
program pp
implicit none
integer 1 flag,cnt,i,i1,i2,i3,j,k,p(1000),tri(142880),dum
open(2,file='primes1.txt',status='old')
do i=1,12
j=8*I-7
read(2,*)(p(k),k=j,j+7)
enddo
cnt=0
do i1=1,94
do i2=i1+1,95
do i3=i2+1,96
cnt=cnt+1
tri(cnt)=p(i1)*p(i2)*p(i3)
enddo
enddo
enddo
do i=1,cnt-1
do j=i+1,cnt
if(tri(i).gt.tri(j))then
dum=tri(j)
tri(j)=tri(i)
tri(i)=dum
endif
enddo
enddo
flag=0
do i=1,142878
if(flag.eq.0.and.tri(i)+1.eq.tri(i+1))then
print*,tri(i),tri(i+1)
flag=1
endif
if(tri(i)+1.eq.tri(i+1).and.tri(i)+2.eq.tri(i+2))then
print*,tri(i),tri(i+1),tri(i+2)
stop
endif
enddo
end
Note: soon after the set given, trios come fast and furiously:
1309 1310 1311
1885 1886 1887
2013 2014 2015
2665 2666 2667
3729 3730 3731
5133 5134 5135
6061 6062 6063
6213 6214 6215
6477 6478 6479
6853 6854 6855
6985 6986 6987
7257 7258 7259
7953 7954 7955
...
Edited on October 14, 2018, 10:08 am