1Math::NumSeq::StarNumbeUrsse(r3)Contributed Perl DocumenMtaatthi:o:nNumSeq::StarNumbers(3)
2
3
4

NAME

6       Math::NumSeq::StarNumbers -- star numbers 6*i*(i-1)+1
7

SYNOPSIS

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

DESCRIPTION

14       The sequence of star numbers 1, 13, 37, 73, 121, etc, 6*i*(i-1)+1, also
15       called the centred 12-gonals.
16

FUNCTIONS

18       See "FUNCTIONS" in Math::NumSeq for behaviour common to all sequence
19       classes.
20
21       "$seq = Math::NumSeq::StarNumbers->new ()"
22           Create and return a new sequence object.
23
24   Random Access
25       "$value = $seq->ith($i)"
26           Return "6*$i*($i-1)+1".
27
28       "$bool = $seq->pred($value)"
29           Return true if $value is of the form 6*i*(i-1)+1 for some i.
30
31       "$i = $seq->value_to_i_floor($value)"
32       "$i = $seq->value_to_i_estimate($value)"
33           Return the i for the star number <= $value.
34

SEE ALSO

36       Math::NumSeq, Math::NumSeq::Polygonal
37

HOME PAGE

39       <http://user42.tuxfamily.org/math-numseq/index.html>
40

LICENSE

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