{"id":21536685,"url":"https://github.com/kartmaan/lychrel-number","last_synced_at":"2025-10-14T07:10:44.830Z","repository":{"id":155750877,"uuid":"311669485","full_name":"Kartmaan/lychrel-number","owner":"Kartmaan","description":"Iterative process of adding numbers with their palindrome in order to end up with a new palindrome, or not...","archived":false,"fork":false,"pushed_at":"2020-11-11T15:00:36.000Z","size":17,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-24T07:29:59.631Z","etag":null,"topics":["196-algorithm","algorithm","calculations","lychrel-number","math","mathematics","palindrome","palindrome-number","unsolved-problems"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Kartmaan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-11-10T13:38:02.000Z","updated_at":"2024-05-06T14:26:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"15b3bf3e-cf89-47e8-b465-76c395592534","html_url":"https://github.com/Kartmaan/lychrel-number","commit_stats":null,"previous_names":["kartmaan/lychrel-number","kartmaan/lychrel_number"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kartmaan%2Flychrel-number","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kartmaan%2Flychrel-number/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kartmaan%2Flychrel-number/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kartmaan%2Flychrel-number/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Kartmaan","download_url":"https://codeload.github.com/Kartmaan/lychrel-number/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244104858,"owners_count":20398748,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["196-algorithm","algorithm","calculations","lychrel-number","math","mathematics","palindrome","palindrome-number","unsolved-problems"],"created_at":"2024-11-24T03:20:59.993Z","updated_at":"2025-10-14T07:10:39.774Z","avatar_url":"https://github.com/Kartmaan.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Lychrel_number\nIterative process of adding numbers with their palindrome in order to end up with a new palindrome, or not... (Lychrel number).\n\n## What does the algorithm do ?\n- x is an integer positive number\n- We add this number with its palindrome (its mirror).\n- If the result is a palindrome, the iteration process stops\n- If the result is not a palindrome, we add this result with its palindrome. This iterative process is repeated as long as the \nresult is not a palindrome.\n- The function returns a list containing the intermediate calculation steps until obtaining the palindrome\n- By default (`detailed = False`), only the result of intermediate operations is added to the list, but a more detailed display of the \ncalculations is possible by setting `detailed = True`, in this case, each addition and its result appear in lists.\n\nExemple for 192 : 192+291 = 483 | 483+384 = 867 | 867+768 = 1635 | 1635+5361 = 6996\n- `detailed = False` : [483, 867, 1635, 6996]\n- `detailed = True` : [[192, 291, 483], [483, 384, 867], [867, 768, 1635], [1635, 5361, 6996]]\n\n![cap_192](https://user-images.githubusercontent.com/11463619/98821956-7da61a80-2430-11eb-96a6-a1c6d148444f.png)\n\n## What's a Lychrel number ?\nThere are some numbers for which this iterative process does not end, i.e. the algorithm cannot result in a palindrome in a \nreasonable time. 196 is on of them, for this value supercomputers reached 1 billion-digit numbers without reaching the palindrome, \nthese numbers are called Lychrel numbers. There are other numbers like this: 295, 394, 493, 592, 689 ...\n\nIn this algorithm, in order to avoid endless loops, a duration in seconds is allocated to the calculation, beyond this allotted \ntime the process stops, meaning that the number inserted is potentially a Lychrel number. By default the allotted time is `wd = 5`, \ni.e. 5 seconds. \nWhen the iteration stops due to time out, the function returns a list in which is found :\n- [0] \"ITER. STOP\" flag\n- [1] Time allocated to the calculation (in seconds)\n- [2] Value on which the iteration process stopped (scientific notation)\n- [3] The initial number inserted\n\n![cap_lychrel](https://user-images.githubusercontent.com/11463619/98821963-7f6fde00-2430-11eb-8e8d-bd5fe3b0c36a.png)\n\n## An unsolved problem\nAs far as supercomputers are able to calculate, these Lychrel numbers have not resulted in any palindrome, however there \nis currently no formal mathematical proof to ensure that these numbers will never result in a palindrome. \nThe reasons why these numbers are the exception is also a poorly understood problem.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkartmaan%2Flychrel-number","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkartmaan%2Flychrel-number","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkartmaan%2Flychrel-number/lists"}