The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A188666 Largest m <= n such that lcm(m, m+1, ..., n) = lcm(1, 2, ..., n). 6

%I #28 Nov 29 2022 12:15:18

%S 1,2,2,3,3,4,4,5,5,7,7,7,7,8,8,9,9,11,11,11,11,13,13,13,13,16,16,16,

%T 16,16,16,17,17,19,19,19,19,23,23,23,23,23,23,23,23,25,25,25,25,27,27,

%U 27,27,29,29,29,29,31,31,31,31,32,32,37,37,37,37,37,37

%N Largest m <= n such that lcm(m, m+1, ..., n) = lcm(1, 2, ..., n).

%C By definition: A003418(n) = lcm(a(n), a(n)+1, ... n)

%C and lcm(m, m+1, ... n) < A003418(n) for m > a(n);

%C all terms are prime powers, cf. A000961: A010055(a(n)) = 1;

%C a(A110654(n)) = A000015(n);

%C floor(n/2)+1 <= a(n) < a(2*(a(n));

%C A000961(n+1) = a(2*A000961(n)) = a(A138929(n)), cf. formula.

%C A237709 gives number of occurrences of n-th prime power. - _Reinhard Zumkeller_, Feb 12 2014

%C Conjecture: a(n) = A000015(floor(n/2)+1). - _Georg Fischer_, Nov 29 2022

%H Reinhard Zumkeller, <a href="/A188666/b188666.txt">Table of n, a(n) for n = 1..10000</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/LeastCommonMultiple.html">Least Common Multiple</a>

%H Wikipedia, <a href="http://en.wikipedia.org/wiki/Least_common_multiple">Least Common Multiple</a>

%H <a href="/index/Lc#lcm">Index entries for sequences related to lcm's</a>

%F a(k) = A000961(k+1) for k: 2*A000961(k) <= k < 2*A000961(k+1), k > 0.

%t Table[Block[{k = n, m = LCM @@ Range[n]}, While[LCM @@ Range[k, n] != m, k--]; k], {n, 69}] (* _Michael De Vlieger_, Nov 29 2022 *)

%o (Haskell)

%o import Data.List (elemIndices)

%o a188666 n = a188666_list !! (n-1)

%o a188666_list = g 1 a000961_list where

%o g n pps'@(pp:pp':pps) | n < 2*pp = pp : g (n+1) pps'

%o | otherwise = pp' : g (n+1) (pp':pps)

%o -- Alternative, rewriting the definition, but less efficient:

%o a188666' n = last $ elemIndices (f 1) $ map f [0..n] where

%o f from = foldl lcm 1 [from..n]

%o (PARI) A188666(n)=L=lcm(n=vector(n-1,k,k+1));!for(m=1,#n,lcm(n[-m..-1])==L&&return(#n+2-m))\\ Rather illustrative than efficient. - _M. F. Hasler_, Jul 25 2015

%Y Cf. A000015, A051173, A099996.

%K nonn

%O 1,2

%A _Reinhard Zumkeller_, Apr 25 2011

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 14 07:09 EDT 2024. Contains 372530 sequences. (Running on oeis4.)