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.
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
Offset: 1
Examples
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
Links
- Hal M. Switkay, Table of n, a(n) for n = 1..5040
Programs
-
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 *)
-
PARI
a(n) = for(i = 2, n, if(n%i != 0, return(lcm([1..i-1])))); n \\ David A. Corneth, Jan 27 2024
Comments