NAME
Math::NumSeq::DedekindPsiSteps  psi function until 2^x*3^y
SYNOPSIS
use Math::NumSeq::DedekindPsiSteps;
my $seq = Math::NumSeq::DedekindPsiSteps>new;
my ($i, $value) = $seq>next;
DESCRIPTION
This sequence is the how many repeated applications of the Dedekind psi function are required to reach a number of the form 2^x*3^y.
0,0,0,0,1,0,1,0,0,1,1,0,2,1,1,0,1,0,2,1,1,1,1,0,2,2,0,1,2,...
The psi function is
psi(n) = product (p+1) * p^(e1)
prime factors p^e in n
The p+1 means that one copy of each distinct prime in n is changed from p to p+1. That p+1 is even, so although the value has increased the prime factors are all less than p. Repeated applying that reduction eventually reaches just primes 2 and 3 in some quantity.
For example i=25 requires 2 steps,
psi(25) = (5+1)*5 = 30 = 2*3*5
then
psi(30) = (2+1)*(3+1)*(5+1) = 72 = 2*2*2*3*3
If i is already 2s and 3s then it's considered no steps are required and the value is 0. For example at i=12=2*2*3 the value is 0.
FUNCTIONS
See "FUNCTIONS" in Math::NumSeq for behaviour common to all sequence classes.
Random Access
$value = $seq>ith($i)

Return the number of repeated applications of the psi function on
$i
required to reach just factors 2 and 3.This calculation requires factorizing
$i
and in the current code after small factors a hard limit of 2**32 is enforced in the interests of not going into a nearinfinite loop. Above that the return isundef
.
SEE ALSO
Math::NumSeq, Math::NumSeq::TotientSteps, Math::NumSeq::DedekindPsiCumulative
HOME PAGE
http://user42.tuxfamily.org/mathnumseq/index.html
LICENSE
Copyright 2012, 2013, 2014 Kevin Ryde
MathNumSeq 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.
MathNumSeq 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 MathNumSeq. If not, see <http://www.gnu.org/licenses/>.