1Math::NumSeq::DeletableUPsreirmeCso(n3t)ributed Perl DocMuamtehn:t:aNtuimoSneq::DeletablePrimes(3)
2
3
4

NAME

6       Math::NumSeq::DeletablePrimes -- primes on deleting a digit repeatedly
7

SYNOPSIS

9        use Math::NumSeq::DeletablePrimes;
10        my $seq = Math::NumSeq::DeletablePrimes->new;
11        my ($i, $value) = $seq->next;
12

DESCRIPTION

14       The deletable primes, being primes which can have a digit removed to
15       give another prime which in turn is deletable.
16
17           2, 3, 5, 7, 13, 17, 23, 29, 31, 37, 43, ...     (A080608)
18           starting i=0
19
20       For example 367 is a deletable prime because it's possible to delete
21       the 6 giving prime 37 then from that delete the 3 giving prime 7.
22
23       There can be more than one chain of deleted digits, as for example 367
24       instead delete 3 to 67 then to 7.  Since the chain ends with single
25       digit prime 2, 3, 5 or 7, all values have at least one such digit.
26
27       Leading zeros are not allowed, so the high digit cannot be deleted if
28       it's followed by a zero.  For example 2003 is not a deletable prime.
29       Deleting the 2 to give 003 is not allowed (though it would be a prime),
30       and other deletes to 203 or 200 are not primes.
31
32   Radix
33       Optional parameter "radix" selects a base other than decimal.  For
34       binary "radix=>2", primes 2 and 3 which are two bits "10" and "11" are
35       reckoned as endpoints in the manner of OEIS A096246, since there are no
36       one-bit primes.
37

FUNCTIONS

39       See "FUNCTIONS" in Math::NumSeq for behaviour common to all sequence
40       classes.
41
42       "$seq = Math::NumSeq::DeletablePrimes->new ()"
43       "$seq = Math::NumSeq::DeletablePrimes->new (radix => $integer)"
44           Create and return a new sequence object.
45
46       "$bool = $seq->pred($value)"
47           Return true if $value is a deletable prime, in the selected radix.
48
49           In the current code a hard limit of 2**32 is placed on the $value
50           to be checked, in the interests of not going into a near-infinite
51           loop.
52

SEE ALSO

54       Math::NumSeq, Math::NumSeq::Primes, Math::NumSeq::SophieGermainPrimes
55
56
57
58perl v5.38.0                      2023-07-20  Math::NumSeq::DeletablePrimes(3)
Impressum