Skip to content

KBracelets ​

Words of length nn over a kk-letter alphabet up to rotation and reflection — bracelets over kk colours, a lazy indexed family.

KBracelets(n, k)the bracelets of nn beads, each one of kk colours.
Typed signatures
TypePackageApplies
(integer<0..>, integer<0..>) -> indexed_collection<list<integer>>combinatoricsalways

Domain: Collections

Details
  • A lazy indexed collection; generalises BinaryBracelets from k=2k=2 to any alphabet size, by the same Burnside sum over DnD_n.
  • Each element is the lexicographically-least word in its rotation-and-reflection orbit, over letters 0,…,k−10,…,k-1.
  • AtAt unranks over these canonical words in ascending lexicographic order.

Enumeration

Examples

1 more kept as data, checked against the oracles
Basic #

Count(KBracelets(4,3))=21Count(KBracelets(4, 3)) = 21: bracelets of length 4 over a 3-letter alphabet

live ↗
InCount(KBracelets(4,3))\mathrm{Count}(\mathrm{KBracelets}(4, 3))Out2121
Scope #

Exact past 2532^{53}: 3-color bracelets of 41 beads

live ↗
InCount(KBracelets(41,3))\mathrm{Count}(\mathrm{KBracelets}(41, 3))Out444 792 643 976 161 803444\,792\,643\,976\,161\,803

Known value · OEIS A027671 b-file

Properties #

KBracelets(n,2)KBracelets(n, 2) agrees with BinaryBracelets(n)(n) — same Burnside sum over DnD_n

live ↗
InCount(KBracelets(5,2))=Count(BinaryBracelets(5))\mathrm{Count}(\mathrm{KBracelets}(5, 2))=\mathrm{Count}(\mathrm{BinaryBracelets}(5))OutTrue\mathrm{True}

The 3-color bracelets of nn beads, n=0…17n = 0 \dots 17

live ↗
InMap(n↦Count(KBracelets(n,3)),0..1..17)\mathrm{Map}(n↦\mathrm{Count}(\mathrm{KBracelets}(n, 3)), 0..1..17)Out[1,3,6,10,21,39,92,198,498,1 219,3 210,8 418,22 913,62 415,173 088,481 598,1 351 983,3 808 083]\bigl\lbrack1, 3, 6, 10, 21, 39, 92, 198, 498, 1\,219, 3\,210, 8\,418, 22\,913, 62\,415, 173\,088, 481\,598, 1\,351\,983, 3\,808\,083\bigr\rbrack

Known value · OEIS A027671

About
Examples5
CrosswalkSymPy

See also: BinaryBracelets, Totient, Count, At