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 A182021 #13 Apr 15 2023 05:04:16 %S A182021 3,2,3,3,3,4,4,5,4,5,5,5,5,5,5,6,6,6,7,6,7,7,7,7,7,7,7,7,7,8,8,8,8,9, %T A182021 8,9,9,9,9,9,9,9,9,9,9,9,9,10,10,10,10,10,11,10,11,11,11,11,11,11,11, %U A182021 11,11,11,11,11,11,11,11,12,12,12,12,12,12,13,12,13 %N A182021 Achromatic number of n-cycle. %D A182021 Hare, W. R.; Hedetniemi, S. T.; Laskar, R.; Pfaff, J. Complete coloring parameters of graphs. Proceedings of the sixteenth Southeastern international conference on combinatorics, graph theory and computing (Boca Raton, Fla., 1985). Congr. Numer. 48 (1985), 171--178. MR0830709 (87h:05088) %F A182021 Let s_m = m^2/2 if m even, m(m-1)/2 if m odd. For m >= 0, the s_m sequence is 0, 0, 2, 3, 8, 10, 18, 21, 32, 36, 50, ... (A093353 with a different offset). %F A182021 Suppose s_m <= n < s_{m+1}. If m is odd and n = s_m + 1 then a(n) = m-1, otherwise a(n) = m. %p A182021 A093353 := proc(n) %p A182021 if n < 1 then %p A182021 0; %p A182021 else %p A182021 (n + modp(n,2))*(n+1)/2 ; %p A182021 end if; %p A182021 end proc: %p A182021 A182021 := proc(n) %p A182021 for m from 0 do %p A182021 sm := A093353(m-1) ; %p A182021 if sm > n then %p A182021 m := m-1 ; %p A182021 sm := A093353(m-1) ; %p A182021 if type(m,'odd') and n = sm+1 then %p A182021 return m-1 ; %p A182021 else %p A182021 return m; %p A182021 end if; %p A182021 end if; %p A182021 end do: %p A182021 end proc: %p A182021 seq(A182021(n),n=3..80) ; # _R. J. Mathar_, Jul 12 2013 %t A182021 A093353[n_] := If[n < 1, 0, (n+Mod[n, 2])*(n+1)/2]; %t A182021 a[n_] := For[m = 0, True, m++, sm = A093353[m-1]; If[sm > n, m = m-1; sm = A093353[m-1]; If[OddQ[m] && n == sm+1, Return[m-1], Return[m]]]]; %t A182021 Table[a[n], {n, 3, 80}] (* _Jean-François Alcover_, Apr 15 2023, after _R. J. Mathar_ *) %K A182021 nonn,easy %O A182021 3,1 %A A182021 _N. J. A. Sloane_, Apr 06 2012