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 A382411 #27 Apr 08 2025 13:20:11 %S A382411 1,2,12,96,840,7920,80640,887040,10523520,134265600,1836172800, %T A382411 26824089600,417210393600,6887085004800,120306041856000, %U A382411 2217815728128000,43038178799616000,877125197684736000,18733345462960128000,418459145406382080000,9758369954796503040000,237164153561075220480000 %N A382411 a(n) is the greatest possible length of a circular sequence on n symbols such that: no two adjacent symbols are the same, any group of n adjacent symbols contains at least n-1 different symbols, and all groups of n adjacent symbols within the sequence are unique. %H A382411 Dean D. Ballard, <a href="/A382411/b382411.txt">Table of n, a(n) for n = 1..50</a> %H A382411 Dean D. Ballard, <a href="/A382411/a382411.pdf">Proof of Formula</a> %F A382411 a(n) = n!*(n^2 - 3*n + 4)/2. %F A382411 a(n) = A000142(n) * A152947(n). %e A382411 Using symbols from the set {A, B, C} the sequence ABCACBCBABAC, when arranged in a circle, contains these 12 unique groups of three: ABC, BCA, CAC, ACB, CBC, BCB, CBA, BAB, ABA, BAC, ACA, and CAB. Each group contains at least two different symbols, no two adjacent symbols are the same, and the whole sequence contains the complete set of groups of three meeting these conditions. Hence, a(3)=12. %t A382411 A382411[n_] := n!*(n*(n - 3) + 4)/2; Array[A382411, 25] (* _Paolo Xausa_, Apr 08 2025 *) %Y A382411 Cf. A000142, A152947. %K A382411 nonn,easy %O A382411 1,2 %A A382411 _Dean D. Ballard_, Mar 24 2025