%I #17 Dec 12 2024 10:11:56
%S 1,2,4,6,12,24,60,120,240,360,840,1680,2520,5040,10080,27720,55440,
%T 110880,332640,720720,1441440,4324320,21621600,73513440,367567200,
%U 735134400,1396755360,6983776800,13967553600,27935107200,160626866400,321253732800,642507465600
%N Highly composite numbers (A002182) whose following highly composite number is at least 3/2 times greater.
%C While it can be proved that the related sequence A162935 is finite, I'm not sure whether this sequence is also finite.
%C Ramanujan proved that the asymptotic limit of the ratio between consecutive highly composite numbers is 1. Therefore this sequence is finite. Erdős proved that for two consecutive highly composite numbers k < k', k'/k <= 1 + 1/log(k)^c with c = 3/32. Nicolas improved the value to c = log(15/8)/(8*log(2)) = 0.113... thus the largest term of this sequence is below exp(2^(1/c)) < 3 * 10^196. By checking the terms of A002182 up to this bound it was found that there are 62 terms in this sequence, the largest is being A002182(1349) ~ 1.158... * 10^98. - _Amiram Eldar_, Aug 20 2019
%H Amiram Eldar, <a href="/A162936/b162936.txt">Table of n, a(n) for n = 1..62</a>
%H Paul Erdős, <a href="https://doi.org/10.1112/jlms/19.75_Part_3.130">On highly composite numbers</a>, Journal of the London Mathematical Society, Vol. 19, No. 75 (1944), pp. 130-133, <a href="https://users.renyi.hu/~p_erdos/1944-04.pdf">alternative link</a>.
%H Jean-Louis Nicolas, <a href="https://doi.org/10.4153/CJM-1971-012-6">Répartition des nombres hautement composés de Ramanujan</a>, Canadian Journal of Mathematics, Vol. 23, No. 1 (1971), pp. 116-130.
%H Srinivasa Ramanujan, <a href="https://doi.org/10.1112/plms/s2_14.1.347">Highly composite numbers</a>, Proceedings of the London Mathematical Society, Series 2, Vol. 14, No. 1 (1915), pp. 347-409, <a href="http://ramanujan.sirinudi.org/Volumes/published/ram15.html">alternative link</a>.
%o (Haskell) import Data.Ratio
%o import Data.Set (Set)
%o import qualified Data.Set as Set
%o printList :: (Show a) => [a] -> IO()
%o printList = putStr . concat . map (\x -> show x ++ "\n")
%o isPrime n
%o ..| n >= 2 = all isNotDivisor $ takeWhile smallEnough primes
%o ..| otherwise = False
%o ..where
%o ....isNotDivisor d = n `mod` d /= 0
%o ....smallEnough d = d^2 <= n
%o primes = 2 : filter isPrime [ 2 * n + 1 | n <- [1..] ]
%o primeSynthesis = partialSynthesis 1 primes
%o ..where
%o ....partialSynthesis n _ [] = n
%o ....partialSynthesis n (p:ps) (c:cs) = partialSynthesis (n * p^c) ps cs
%o primeAnalysis n
%o ..| n < 1 = undefined
%o ..| n == 1 = []
%o ..| n > 1 = reverse $ buildPrimeCounts [0] n
%o ..where
%o ....buildPrimeCounts (c:cs) n
%o ......| n == 1 = (c:cs)
%o ......| n `mod` p == 0 = buildPrimeCounts (c+1 : cs) (n `div` p)
%o ......| otherwise = buildPrimeCounts (0:c:cs) n
%o ......where p = primes !! (length cs)
%o divisorCount n = product $ map (+1) $ primeAnalysis n
%o primorialProducts = resFrom 1
%o ..where
%o ....resFrom n = resBetween n (4*n - 1) ++ resFrom (4*n)
%o ....resBetween start end = Set.toAscList $ Set.fromList $ unorderedList
%o ......where
%o ........unorderedList = filter (>= start) (1 : build 0 [])
%o ........build pos exponents
%o ..........| nextNumber <= end = nextNumber : build 0 nextCombination
%o ..........| newPrime = []
%o ..........| otherwise = build (pos + 1) exponents
%o ..........where
%o ............newPrime = pos >= length exponents
%o ............nextCombination
%o ..............| newPrime = replicate (length exponents + 1) 1
%o ..............| otherwise = replicate (pos + 1) ((exponents !! pos) + 1)
%o ..............................++ drop (pos + 1) exponents
%o ............nextNumber = primeSynthesis nextCombination
%o filterStrictlyMonotonicDivisorCount = filterRest 0
%o ..where
%o ....filterRest _ [] = []
%o ....filterRest lim (num:nums)
%o ......| divisorCount num > lim = num : filterRest (divisorCount num) nums
%o ......| otherwise = filterRest lim nums
%o highlyCompositeNumbers
%o ..= filterStrictlyMonotonicDivisorCount primorialProducts
%o findGaps [] = []
%o findGaps [_] = []
%o findGaps (x1:x2:xs)
%o ..| x1 * 3 <= x2 * 2 = (x1,x2) : findGaps (x2:xs)
%o ..| otherwise = findGaps (x2:xs)
%o main = mapM (putStrLn . show . fst) (findGaps highlyCompositeNumbers)
%Y Cf. A002182, A162935.
%K nonn,fini,full
%O 1,2
%A Jan Behrens (jbe-oeis(AT)magnetkern.de), Jul 17 2009
%E a(32)-a(33) from _Amiram Eldar_, Aug 20 2019