<jupyter_start><jupyter_text>The Hailstone sequence: a mathematical mystery   Explication Hailstone sequence:   N'= N/2  N'= 3N+1 As an example we take the number 6<jupyter_code>n=6
print(n)
import time
while n != 1:
    time.sleep (1.5)
    if n%2 == 0:
        n = n/2
    else:
        n =(n*3)+1
    print(n)<jupyter_output><empty_output><jupyter_text>Programs  First one<jupyter_code>for n in range(1,1001):
    print("Sequence:", n)
    print(n)
    while n != 1:
        if n%2 == 0:
            n = n/2
        else:
            n =(n*3)+1
        print(n)<jupyter_output><empty_output><jupyter_text>Second one<jupyter_code>amount = 1
amax = 0
nmax=0
np=0
for n in range(1,1001):
    print("Sequence:", n)
    np=n
    while n != 1:

        if n%2 == 0:
        #print(n)
           n = n/2
        else:
            n =(n*3)+1
        amount=amount+1
        
        if amount-amax>0:
            amax=amount
            nmax=np
          
    #print (n)
    print("In this sequence there are", amount, "steps")
    amount=1

print("The maximum of numbers is",amax,"for n=",nmax,)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.13380909901873328, 'fraction_numerical': 0.03746654772524532, 'mean_word_length': 2.178470254957507, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 14, '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': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '53911', 'license': 'MIT', 'n_tokens_mistral': 448, 'n_tokens_neox': 425, 'n_words': 104, 'path': 'Hailstone.ipynb', 'repo_name': 'ECaMorlaix-TSI-1718/DNL', 'size': '1121'}