{"id":17912123,"url":"https://github.com/jarun/primepalindrome","last_synced_at":"2025-09-21T23:33:46.950Z","repository":{"id":93339669,"uuid":"86559776","full_name":"jarun/primepalindrome","owner":"jarun","description":"A C program to find the 1500th 13-digit prime palindrome in \u003c 3 secs!","archived":false,"fork":false,"pushed_at":"2018-05-29T04:15:13.000Z","size":61,"stargazers_count":28,"open_issues_count":0,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-12-30T19:42:47.400Z","etag":null,"topics":["programming","puzzle"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jarun.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2017-03-29T08:53:38.000Z","updated_at":"2024-11-16T22:40:16.000Z","dependencies_parsed_at":"2023-03-07T09:30:29.797Z","dependency_job_id":null,"html_url":"https://github.com/jarun/primepalindrome","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jarun%2Fprimepalindrome","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jarun%2Fprimepalindrome/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jarun%2Fprimepalindrome/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jarun%2Fprimepalindrome/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jarun","download_url":"https://codeload.github.com/jarun/primepalindrome/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233808779,"owners_count":18733600,"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":["programming","puzzle"],"created_at":"2024-10-28T19:43:18.817Z","updated_at":"2025-09-21T23:33:41.637Z","avatar_url":"https://github.com/jarun.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PrimePalindrome\n\nA fast C program to calculate the 1500th prime palindrome with an odd number (default 15) of digits.\nWhy _odd_? Because a palindromic number with even number of digits is always divisible by 11.\n\nImplements space-optimized Sieve of Eratosthenes (default) with GCC-specific hardware-aided `ffsll()`as well as brute force methods.\n\nThis program is also a demonstration of using efficient algorithms and C code-optimization.\n\n## Execution time (brute force)\n\n/* On Intel(R) Core(TM) i5-3210M CPU @ 2.50GHz */\n\n**Without logic to generate next palindrome (13 digits)**\n\n    $ ./pp\n    Thu Jul  2 00:28:26 IST 2015\n    Thu Jul  2 00:32:17 IST 2015\n    count: 1500 val: 1015834385101\n    3 minutes 51 seconds\n\n**With logic to generate next palindrome (13 digits)**\n\n    $ ./pp\n    Tue Oct 27 23:40:41 IST 2015\n    Tue Oct 27 23:40:48 IST 2015\n    1500. 1015834385101\n    *7 seconds!!!*\n\n**With tweaked (but brute-force) prime detection algorithm (13 digits)**\n\n    $ time ./pp\n    Sat Mar  5 00:04:23 IST 2016\n    Sat Mar  5 00:04:29 IST 2016\n    1015834385101\n    5.86user 0.00system 0:05.86elapsed 100%CPU (0avgtext+0avgdata 2020maxresident)k\n    0inputs+0outputs (0major+420minor)pagefaults 0swaps\n\n/* On Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz */\n\n    // Sieve of Eratosthenes\n    13 digits: 2.80user 0.00system 0:02.80elapsed 99%CPU (0avgtext+0avgdata 1428maxresident)k\n    15 digits: 23.94user 0.00system 0:23.94elapsed 100%CPU (0avgtext+0avgdata 3240maxresident)k\n\n    // Brute force\n    13 digits: 3.75user 0.00system 0:03.75elapsed 100%CPU (0avgtext+0avgdata 1544maxresident)k\n    15 digits: 36.94user 0.00system 0:36.94elapsed 99%CPU (0avgtext+0avgdata 1208maxresident)k\n\n## License \u0026 Copyright\n\nGPLv3.0\n\nCopyright (C) 2015 [Arun Prakash Jana](mailto:engineerarun@gmail.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjarun%2Fprimepalindrome","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjarun%2Fprimepalindrome","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjarun%2Fprimepalindrome/lists"}