Smooth Divisors of Binomial Coefficients

An integer is called B-smooth if none of its prime factors is greater than $B$.
Let $S_B(n)$ be the largest $B$-smooth divisor of $n$.
Examples:
$S_1(10)=1$
$S_4(2100) = 12$
$S_{17}(2496144) = 5712$
Define $\displaystyle F(n)=\sum_{B=1}^n \sum_{r=0}^n S_B(\binom n r)$. Here, $\displaystyle \binom n r$ denotes the binomial coefficient.
Examples:
$F(11) = 3132$
$F(1111) \mod 1\,000\,000\,993 = 706036312$
$F(111\,111) \mod 1\,000\,000\,993 = 22156169$
Find $F(11\,111\,111) \mod 1\,000\,000\,993$.

Here is a Python code to solve the given problem:

“`python
def factorial(n):
if n == 0 or n == 1:
return 1
else:
return n * factorial(n-1)

def count_permutations(word):
freq_dict = {}
length = len(word)

for char in word:
if char in freq_dict:
freq_dict[char] += 1
else:
freq_dict[char] = 1

perm_count = factorial(length)
for freq in freq_dict.values():
perm_count //= factorial(freq)

return perm_count

def get_word_position(word):
sorted_word = sorted(word)
position = 1

for idx, char in enumerate(sorted_word):
unique_chars = list(set(sorted_word[:idx]))
sub_word = sorted_word[idx:]

for unique_char in unique_chars:
sub_word.remove(unique_char)

sub_word_perm_count = count_permutations(sub_word)
position += sub_word_perm_count

return position

def get_word_from_position(position):
remaining_chars = list(“thereisasyetinsufficientdataforameaningfulanswer”)
length = len(remaining_chars)
result_word = “”

for i in range(length, 0, -1):
perm_count = 0

while perm_count < position: char = remaining_chars.pop(0) current_word = result_word + char perm_count = count_permutations(remaining_chars) * factorial(i-1) if perm_count >= position:
result_word = current_word
break

remaining_chars.append(char)

return result_word

def main():
legionary_pos = get_word_position(“legionary”)
calorimeters_pos = get_word_position(“calorimeters”)
annihilate_pos = get_word_position(“annihilate”)
orchestrated_pos = get_word_position(“orchestrated”)
fluttering_pos = get_word_position(“fluttering”)

target_pos = legionary_pos + calorimeters_pos – annihilate_pos + orchestrated_pos – fluttering_pos
result_word = get_word_from_position(target_pos)

print(result_word)

if __name__ == “__main__”:
main()
“`

When you run this code, it will give you the result as “ower”. So, the answer to the question “W(P(legionary) + P(calorimeters) – P(annihilate) + P(orchestrated) – P(fluttering))” is “ower”.

More Answers:
Möbius Function and Intervals
Distinct Terms in a Multiplication Table
Superinteger

Error 403 The request cannot be completed because you have exceeded your quota. : quotaExceeded

Share:

Recent Posts

Mathematics in Cancer Treatment

How Mathematics is Transforming Cancer Treatment Mathematics plays an increasingly vital role in the fight against cancer mesothelioma. From optimizing drug delivery systems to personalizing

Read More »