%I #41 May 13 2026 13:37:44
%S 1,3,6,10,15,19,24,27,32,35,40,43,48,51,56,59,64,67,72,75,80,83,88,91,
%T 96,99,104,107,112,115,120,123,128,131,136,139,144,147,152,155,160,
%U 163,168,171,176,179,184,187,192,195,200,203,208,211,216,219,224,227
%N Maximum number of segments between n points on a circle so that they can be colored in 2 colors so that each of them intersects (at an internal point) at most one other segment of the same color.
%H Art of Problem Solving, <a href="https://artofproblemsolving.com/community/c6h3244051p29752645">High School Olympiads - Colored segments</a>, 2024.
%H Bulgarian Winter Mathematical Competition "Atanas Radev", <a href="https://web.archive.org/web/20240526160029/https://mgyambol.com/docs/Broshura_ZMS_2024.pdf">Problems and solutions brochure</a>, Problem 9.4, p. 6 (in Bulgarian).
%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (1,1,-1).
%F a(n) = n*(n-1)/2 for n<=6, a(2*k+1) = 8*k-5 if k>=3, a(2*k) = 8*k-8 if k>=4.
%F G.f.: -x^2*(x^7-2*x^4-2*x^3-2*x^2-2*x-1)/((x+1)*(x-1)^2).
%F a(n) = A047452(n-2) + 2 = A047461(n-1) - 1 for n >= 7. - _Hugo Pfoertner_, Feb 05 2024
%t Drop[CoefficientList[Series[ -x^2*(x^7-2*x^4-2*x^3-2*x^2-2*x-1)/((x+1)*(x-1)^2),{x,0,59}],x],2] (* _James C. McMahon_, Mar 08 2024 *)
%o (Python)
%o def A369801(n): return (n-2<<2)-(n&1) if n>=7 else (1, 3, 6, 10, 15)[n-2] # _Chai Wah Wu_, Mar 30 2024
%Y Cf. A047452, A047461.
%K nonn,easy
%O 2,2
%A _Mladen Valkov_, Feb 01 2024