This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A368777 #43 Jan 31 2024 07:58:43 %S A368777 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, %T A368777 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, %U A368777 1,2,1,2,1,12,1,2,1,2,1,6,1,2,1,2,1,12 %N 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. %C A368777 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. %H A368777 Hal M. Switkay, <a href="/A368777/b368777.txt">Table of n, a(n) for n = 1..5040</a> %F A368777 a(n) = A003418(A055874(n)) %e A368777 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 %t A368777 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 *) %o A368777 (PARI) a(n) = for(i = 2, n, if(n%i != 0, return(lcm([1..i-1])))); n \\ _David A. Corneth_, Jan 27 2024 %Y A368777 Cf. A003418, A051451, A027750, A055874. %K A368777 nonn,easy %O A368777 1,2 %A A368777 _Hal M. Switkay_, Jan 11 2024