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!)
A368777 a(n) is the largest divisor of n that is a term of the sequence A003418, the least common multiple of the first k natural numbers. 2
1, 2, 1, 2, 1, 6, 1, 2, 1, 2, 1, 12, 1, 2, 1, 2, 1, 6, 1, 2, 1, 2, 1, 12, 1, 2, 1, 2, 1, 6, 1, 2, 1, 2, 1, 12, 1, 2, 1, 2, 1, 6, 1, 2, 1, 2, 1, 12, 1, 2, 1, 2, 1, 6, 1, 2, 1, 2, 1, 60, 1, 2, 1, 2, 1, 6, 1, 2, 1, 2, 1, 12, 1, 2, 1, 2, 1, 6, 1, 2, 1, 2, 1, 12 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
The graph of this sequence gives it the appearance of a ruler-like function. If n is odd, a(n) = 1. If n is even and not a multiple of 6, a(n) = 2. If n is a multiple of 6 but not of 12, a(n) = 6, and so on.
LINKS
FORMULA
a(n) = A003418(A055874(n))
EXAMPLE
a(18) = 6 as 18 is divisible by lcm(1, 2, 3) = 6 but not by lcm(1, 2, 3, 4) = 12. so 6 is the largest divisor of 18 that is a term of A003418. - David A. Corneth, Jan 28 2024
MATHEMATICA
seq[max_] := Module[{lcms = Table[LCM @@ Range[k], {k, max}]}, Table[Max[Select[Divisors[k], MemberQ[lcms, #] &]], {k, 1, max}]]; seq[100] (* Amiram Eldar, Jan 12 2024 *)
PROG
(PARI) a(n) = for(i = 2, n, if(n%i != 0, return(lcm([1..i-1])))); n \\ David A. Corneth, Jan 27 2024
CROSSREFS
Sequence in context: A053589 A055770 A225821 * A113766 A204992 A186726
KEYWORD
nonn,easy
AUTHOR
Hal M. Switkay, Jan 11 2024
STATUS
approved

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 16 23:54 EDT 2024. Contains 372555 sequences. (Running on oeis4.)