1Math::NumSeq::ReverseAdUds(e3r)Contributed Perl DocumentMaattiho:n:NumSeq::ReverseAdd(3)
2
3
4

NAME

6       Math::NumSeq::ReverseAdd -- steps of the reverse-add algorithm
7

SYNOPSIS

9        use Math::NumSeq::ReverseAdd;
10        my $seq = Math::NumSeq::ReverseAdd->new (start => 196);
11        my ($i, $value) = $seq->next;
12

DESCRIPTION

14       The reverse-add sequence from a given starting point.  The digit
15       reversal of a given value is added to make the next.  For example
16       "start => 1",
17
18           1,2,4,8,16,77,154,605,1111,2222,...
19
20       At 16 the reversal is 61, adding those 16+61=77 is the next value.
21       There's some interest in whether a palindrome like 77 is ever reached
22       in the sequence, but the sequence here continues on forever.
23
24       The default is digits reversed in decimal, but the "radix" parameter
25       can select another base.
26

FUNCTIONS

28       See "FUNCTIONS" in Math::NumSeq for behaviour common to all sequence
29       classes.
30
31       "$seq = Math::NumSeq::ReverseAdd->new (start => $n)"
32       "$seq = Math::NumSeq::ReverseAdd->new (start => $n, radix => $r)"
33           Create and return a new sequence object.
34
35   Random Access
36       "$value = $seq->ith($i)"
37           Return the $ith value in the sequence.
38

SEE ALSO

40       Math::NumSeq, Math::NumSeq::ReverseAddSteps
41

HOME PAGE

43       <http://user42.tuxfamily.org/math-numseq/index.html>
44

LICENSE

46       Copyright 2011, 2012, 2013, 2014, 2016, 2019 Kevin Ryde
47
48       Math-NumSeq is free software; you can redistribute it and/or modify it
49       under the terms of the GNU General Public License as published by the
50       Free Software Foundation; either version 3, or (at your option) any
51       later version.
52
53       Math-NumSeq is distributed in the hope that it will be useful, but
54       WITHOUT ANY WARRANTY; without even the implied warranty of
55       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
56       General Public License for more details.
57
58       You should have received a copy of the GNU General Public License along
59       with Math-NumSeq.  If not, see <http://www.gnu.org/licenses/>.
60
61
62
63perl v5.32.0                      2020-07-28       Math::NumSeq::ReverseAdd(3)
Impressum