super-prime

Crates.iosuper-prime
lib.rssuper-prime
version0.1.0
sourcesrc
created_at2023-05-06 08:47:58.790741
updated_at2023-05-06 08:54:52.028276
descriptionFind the super prime number.
homepage
repositoryhttps://github.com/oovm/fun-numbers/tree/dev/projects/super-prime
max_upload_size
id858403
size6,184
SasakiSaki (oovm)

documentation

https://docs.rs/super-prime

README

A super prime is a prime number that, when any of its digits is deleted, the remaining number is still prime.

eg:

  • 1 -> 19 -> 199 -> 1999 -> 13999 -> ...
  • 2 -> 29 -> 269 -> 2969 -> 25969 -> ...

So we called 25969 a super prime.

Examples

# use super_prime::{BigUint, super_prime};
let start = BigUint::from(2usize);
for n in super_prime(&start, 100).into_iter().rev() {
    println!("{}", n);
}
Commit count: 0

cargo fmt