# k-ary bracelets with conserved/fixed indexes

Im using the formula from here:

https://en.wikipedia.org/wiki/Necklace_(combinatorics)#Number_of_bracelets

to calculate the number of unique bracelets, accepting all rotation/mirroring as identical, for a given length n with a given character set of length k

One thing this formula doesnt include, and I cant work out how to add, is what if c number of positions within n have a fixed value? Eg if k = [A, B, C, D, E] and n = 5, how would the bracelet formula be updated to indicate the maximum number of unique bracelets possible with the character "A" (or any other of the characters from set k) fixed at 1 position?

edit perhaps this doesnt exactly make sense, since all rotation/translation is considered equivalent, but what im saying is that the function that creates these bracelets will always put "A" into the first index, and then randomly assign characters from k to all other indexs of n

initially i thought i could just do n-c (c being the number of fixed points), but this is incorrect, it appears the number of unique bracelets that can be generated for n with c=1 is more than n-1

Your edited question effectively says that you want to count the bracelets that contain at least one 'A'. This is the number of bracelets that you can form with $k$ letters minus the number of bracelets that you can form with the $k-1$ letters excluding 'A'; in the notation of the Wikipedia article: $B_k(n)-B_{k-1}(n)$.
• Would this hold true if the fixed A was in any position of the bracelets? What about if multiple A's were in fixed positions? Or if some of the fixed characters were Bs or Cs? Would it just be $B_k(n)-B_{k-c}(n)$ - with $c$ being the number of fixed positions? – Matthew Prasinov Aug 30 '18 at 3:59
• Eg if $n$ was 5, $k$ contained $[A, B, C, D]$, and position 1 was fixed to A and position 4 was fixed to B, would it simply be $B_4(5)-B_{3}(5)$? – Matthew Prasinov Aug 30 '18 at 4:01
• OK I ran some tests and it appears that if im only fixing one of the characters from $k$, then $B_k(n)-B_{k-c}(n)$, with $c$ being any number of the same fixed character, then that does indeed tell me the correct number of unique bracelets possible. However, if i fix several different characters, then that formula is no longer accurate, I end up getting more unique bracelets than it would seem to indicate – Matthew Prasinov Aug 30 '18 at 4:35
• @MatthewPrasinov: I'm not sure I'm following you. If you fix more characters, you should have fewer, not more bracelets; whereas in $B_k(n)-B_{k-c}(n)$, the greater $c$, i.e. the more characters you fix, the less you're subtracting, i.e. the more you're leaving, until for $c=k$ you're not subtracting anything and just ending up with $B_k(n)$, which surely can't be right? – joriki Aug 30 '18 at 5:47