NAME

Math::NumSeq::MathImageGolayRudinShapiro -- numbers with odd number of "11" adjacent 1-bits

SYNOPSIS

use Math::NumSeq::MathImageGolayRudinShapiro;
my $seq = Math::NumSeq::MathImageGolayRudinShapiro->new;
my ($i, $value) = $seq->next;

DESCRIPTION

This is a sequence arising from a sieve replacing multiples described be David Madore,

1, 2, 1, 2, 3, 3, 1, 2, 4, 4, 3, 4, ...

The sieve begins with all 1s,

1,1,1,1,1,1,1,1,1,1,1,1,...

Then every second 1 is changed to 2

1,2,1,2,1,2,1,2,1,2,1,2,...

Then every third 1 is changed to 3, and every third 2 changed to 3 also,

1,2,1,2,3,3,1,2,1,2,3,3,...

Then every fourth 1 becomes 4, fourth 2 becomes 4, fourth 3 becomes 4.

1,2,1,2,3,3,1,2,4,4,3,4,...

The replacement of every Nth with N is applied separately to the 1s, 2s, 3s etc remaining in the sieve at each stage.

FUNCTIONS

$seq = Math::NumSeq::MathImageGolayRudinShapiro->new ()

Create and return a new sequence object.

SEE ALSO

Math::NumSeq