NAME
Math::NumSeq::MathImageSlopingExcluded -- numbers not occurring in sloping binary
SYNOPSIS
use Math::NumSeq::MathImageSlopingExcluded;
my $seq = Math::NumSeq::MathImageSlopingExcluded->new;
my ($i, $value) = $seq->next;
DESCRIPTION
In progress ...
The numbers not occurring in sloping binary,
1, 2, 7, 12, 29, 62, 123, 248, 505, 1018, 2047, 4084, 8181, ...
Sloping binary numbers by David Applegate, Benoit Cloitre, Philippe Deléham and Neil Sloane are defined by writing integers in binary and reading on an upwards diagonal slope skipping the high 1 bit.
integers sloping
0 0
1
/
1 0 11 = 3
/
1 1
/ /
1 0 0 110 = 6
/ /
1 0 1 101 = 5
/ /
1 1 0 100 = 4
/
1 1 1
/
1 0 0 0 1111 = 15
It can be shown that the values resulting give all the integers, except one near each power 2^k. The sequence here is those excluded values.
FUNCTIONS
See "FUNCTIONS" in Math::NumSeq for behaviour common to all sequence classes.
$seq = Math::NumSeq::MathImageSlopingExcluded->new ()
-
Create and return a new sequence object.
$value = $seq->ith($i)
-
Return the
$i
'th value which is not in sloping binary. $bool = $seq->pred($value)
-
Return true if
$value
is not included in sloping binary.