<jupyter_start><jupyter_text>The Least Common Multiple (LCM) of two integers can be found by figuring out their prime factors.<jupyter_code># For example let's take integers a and b
a=6
b=10
print("factors of a:",f.prime_factors_list(a))
print("factors of b:",f.prime_factors_list(b))

# Notice that if the two numbers have common factors these will be present in the lcm only once 
lcm=f.lcm(a,b)
print("lcm({},{})={}".format(a, b, lcm))
print("and its prime factors are:", f.prime_factors_list(lcm))
# It is only logical when you think of numbers as of collections of their factors
list_of_factors=[7,3,2]
print("factors: ", list_of_factors)

number=f.number_from(list_of_factors)
print("the number from the factors: ", number)
# Such a number (or the super collection) will be the multiple of every sub-collection

col_a=list_of_factors[0:-1]
na=f.number_from(col_a)

col_b=list_of_factors[1:]
nb=f.number_from(col_b)

print("All factors, except the last: {} would form a number {}.".format(col_a, na))
print("All factors, except the first: {} would form a number {}.".format(col_b, nb))<jupyter_output>All factors, except the last: [7, 3] would form a number 21.
All factors, except the first: [3, 2] would form a number 6.
{'fraction_non_alphanumeric': 0.12387938060309699, 'fraction_numerical': 0.013039934800325998, 'mean_word_length': 5.860335195530726, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '4011', 'license': 'Unlicense', 'n_tokens_mistral': 441, 'n_tokens_neox': 417, 'n_words': 149, 'path': 'number_theory/lcm.ipynb', 'repo_name': 'EvgeniiaVak/brilliant-python-math', 'size': '1227'}