NAME
Math::NumSeq::MathImageSieveMultiples -- sieving of certain multiples
SYNOPSIS
use Math::NumSeq::MathImageSieveMultiples;
my $seq = Math::NumSeq::MathImageSieveMultiples->new;
my ($i, $value) = $seq->next;
DESCRIPTION
This is a sequence arising from a sieve replacing multiples, per Sloane's OEIS A100002.
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,
1,2,1,2,3,3,1,2,1,2,3,3,...
And every fourth 1, 2 and 3 likewise, etc.
1,2,1,2,3,3,1,2,4,4,3,4,...
The replacing of every fourth (or whatever) is applied separately to the 1s, 2s, 3s etc in the sieve at that stage.