NAME
Math::NumSeq::PisanoPeriodSteps -- Fibonacci frequency and Leonardo logarithm
SYNOPSIS
use Math::NumSeq::PisanoPeriodSteps;
my $seq = Math::NumSeq::PisanoPeriodSteps->new;
my ($i, $value) = $seq->next;
DESCRIPTION
This is the number of times the PisanoPeriod
must be applied before reaching an unchanging value.
0, 4, 3, 2, 3, 1, 2, 2, 1, 2, 3, 1, 3, 2, 3, 1, 2, 1, 2, ...
starting i=1
As per Fulton and Morris
"On arithmetical functions related to the Fibonacci numbers", Acta Arithmetica, volume 16, 1969, pages 105-110. http://matwbn.icm.edu.pl/ksiazki/aa/aa16/aa1621.pdf
repeatedly applying the PisanoPeriod eventually reaches an m which is unchanging, ie. for which PisanoPeriod(m)==m. For example i=5 goes
PisanoPeriod(5)=20
PisanoPeriod(20)=60
PisanoPeriod(60)=60
PisanoPeriod(120)=120
so value=3 applications until to reach unchanging 120
Leonardo Logarithm
The unchanging period reached is always of the form
m = 24 * 5^(l-1)
The "l" exponent is the Leonardo logarithm. Option values_type => "log"
returns that as the sequence values.
0, 1, 1, 1, 2, 1, 1, 1, 1, 2, 2, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, ...
starting i=1
For example the i=5 above ends at m=120=24*5^1 so l-1=1 is l=2 for the sequence value.
FUNCTIONS
See "FUNCTIONS" in Math::NumSeq for behaviour common to all sequence classes.
$seq = Math::NumSeq::PisanoPeriodSteps->new ()
$seq = Math::NumSeq::PisanoPeriodSteps->new (values_type => $str)
-
Create and return a new sequence object.
Random Access
SEE ALSO
Math::NumSeq, Math::NumSeq::Fibonacci
HOME PAGE
http://user42.tuxfamily.org/math-numseq/index.html
LICENSE
Copyright 2012, 2013, 2014, 2016 Kevin Ryde
Math-NumSeq 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 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. If not, see <http://www.gnu.org/licenses/>.