Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/omega-rosetta/blob/main/tasks/ludic-numbers/oracle.py # omega-rosetta aien-dev/omega-rosetta Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `omega-rosetta / tasks / ludic-numbers / oracle.py` 13 lines ยท 615 bytes Raw Blame History 1 # Independent reference for "Ludic numbers" (Python 3, standard library only). 2 # expected.txt is this program's stdout; omc never produced it. 3 lst = list(range(2, 22000)) 4 lud = [1] 5 while lst: 6 lud.append(lst[0]) 7 del lst[::lst[0]] 8 s = set(lud) 9 print("first 25 ludic numbers: " + " ".join(map(str, lud[:25]))) 10 print(f"ludic numbers <= 1000: {sum(1 for x in lud if x <= 1000)}") 11 print("2000th to 2005th ludic numbers: " + " ".join(map(str, lud[1999:2005]))) 12 print("ludic triplets (x, x+2, x+6) below 250: " + 13 " ".join(f"({x}, {x + 2}, {x + 6})" for x in lud if x + 6 < 250 and x + 2 in s and x + 6 in s))