Kevin Ryde


Math::NumSeq::AlphabeticalLengthSteps -- iterations of length in characters


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


This is a count of how many times iterating i -> AlphabeticalLength(i) until reaching a cycle.

    i     = 1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 
    value = 3, 3, 2, 0, 1, 3, 2, 2, 1, 3, 4, 4, 3, 3, 3, ...

For example i=6="six" is 3 letters, then 3="three" is 5 letters, 5="five" is 4 letters, and 4="four" is its own length. This took 3 steps to reach the cycle at 4->4. At i=4 the value is 0 for no steps to reach a cycle "four"=4.


See "FUNCTIONS" in Math::NumSeq for behaviour common to all sequence classes.

$seq = Math::NumSeq::AlphabeticalLengthSteps->new ()
$seq = Math::NumSeq::AlphabeticalLengthSteps->new (lang => $str)

Create and return a new sequence object.

Random Access

$value = $seq->ith($i)

Return the number times to apply AlphabeticalLength until reaching a cycle.


Math::NumSeq, Math::NumSeq::AlphabeticalLength



Copyright 2012 Kevin Ryde

Math-NumSeq-Alpha is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.

Math-NumSeq-Alpha is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with Math-NumSeq-Alpha. If not, see <>.