Get the latest tech news

Right-Truncatable Prime Counter


This C program efficiently calculates the number of right-truncatable primes for a given number of digits. - EbodShojaei/Right-Truncatable-Primes

It uses a custom hash table for fast primality lookups and the primesieve library for high-performance prime generation. Correct Right-Truncatable Logic: Implements the standard definition, ensuring all successive truncations (by removing the rightmost digit) are prime. To run the program, execute the compiled binary and provide the desired number of digits as a command-line argument.

Get the Android app

Or read this on Hacker News