NAME
Math::NumSeq::JugglerSteps -- steps in the juggler sqrt sequence
SYNOPSIS
use Math::NumSeq::JugglerSteps;
my $seq = Math::NumSeq::JugglerSteps->new;
my ($i, $value) = $seq->next;
DESCRIPTION
The number of steps it takes to reach 1 by the Juggler sqrt sequence,
n -> / floor(sqrt(n)) if n odd
\ floor(sqrt(n*n*n)) if n even
FUNCTIONS
See "FUNCTIONS" in Math::NumSeq for the behaviour common to all path classes.
$seq = Math::NumSeq::JugglerSteps->new ()$seq = Math::NumSeq::JugglerSteps->new (step_type => 'down')-
Create and return a new sequence object.
The optional
step_typeparameter (a string) selects between"up" upward steps sqrt(n^3) "down" downward steps sqrt(n) "both" both up and down, which is the default $value = $seq->ith($i)-
Return the number of steps to take
$idown to 1. $bool = $seq->pred($value)-
Return true if
$valueoccurs as a step count. This is simply$value >= 0.