cp's OEIS Frontend

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.

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.

Original entry on oeis.org

1, 2, 12, 96, 840, 7920, 80640, 887040, 10523520, 134265600, 1836172800, 26824089600, 417210393600, 6887085004800, 120306041856000, 2217815728128000, 43038178799616000, 877125197684736000, 18733345462960128000, 418459145406382080000, 9758369954796503040000, 237164153561075220480000
Offset: 1

Views

Author

Dean D. Ballard, Mar 24 2025

Keywords

Examples

			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.
		

Crossrefs

Programs

Formula

a(n) = n!*(n^2 - 3*n + 4)/2.
a(n) = A000142(n) * A152947(n).