1Math::PlanePath::WythofUfsPerrelCiomnitnraiMrbayutTthre:id:aPnPlgealrnele(P3Da)otchu:m:eWnyttahtoifofnPreliminaryTriangle(3)
2
3
4
6 Math::PlanePath::WythoffPreliminaryTriangle -- Wythoff row containing
7 X,Y recurrence
8
10 use Math::PlanePath::WythoffPreliminaryTriangle;
11 my $path = Math::PlanePath::WythoffPreliminaryTriangle->new;
12 my ($x, $y) = $path->n_to_xy (123);
13
15 This path is the Wythoff preliminary triangle by Clark Kimberling,
16
17 13 | 105 118 131 144 60 65 70 75 80 85 90 95 100
18 12 | 97 110 47 52 57 62 67 72 77 82 87 92
19 11 | 34 39 44 49 54 59 64 69 74 79 84
20 10 | 31 36 41 46 51 56 61 66 71 76
21 9 | 28 33 38 43 48 53 58 63 26
22 8 | 25 30 35 40 45 50 55 23
23 7 | 22 27 32 37 42 18 20
24 6 | 19 24 29 13 15 17
25 5 | 16 21 10 12 14
26 4 | 5 7 9 11
27 3 | 4 6 8
28 2 | 3 2
29 1 | 1
30 Y=0 |
31 +-----------------------------------------------------
32 X=0 1 2 3 4 5 6 7 8 9 10 11 12
33
34 A given N is at an X,Y position in the triangle according to where row
35 number N of the Wythoff array "precurses" back to. Each Wythoff row is
36 a Fibonacci recurrence. Starting from the pair of values in the first
37 and second columns of row N it can be run in reverse by
38
39 F[i-1] = F[i+i] - F[i]
40
41 It can be shown that such a reverse always reaches a pair Y and X with
42 Y>=1 and 0<=X<Y, hence making the triangular X,Y arrangement above.
43
44 N=7 WythoffArray row 7 is 17,28,45,73,...
45 go backwards from 17,28 by subtraction
46 11 = 28 - 17
47 6 = 17 - 11
48 5 = 11 - 6
49 1 = 6 - 5
50 4 = 5 - 1
51 stop on reaching 4,1 which is Y=4,X=1 with Y>=1 and 0<=X<Y
52
53 Conversely a coordinate pair X,Y is reckoned as the start of a
54 Fibonacci style recurrence,
55
56 F[i+i] = F[i] + F[i-1] starting F[1]=Y, F[2]=X
57
58 Iterating these values gives a row of the Wythoff array
59 (Math::PlanePath::WythoffArray) after some initial iterations. The N
60 value at X,Y is the row number of the Wythoff array which is reached.
61 Rows are numbered starting from 1. For example,
62
63 Y=4,X=1 sequence: 4, 1, 5, 6, 11, 17, 28, 45, ...
64 row 7 of WythoffArray: 17, 28, 45, ...
65 so N=7 at Y=4,X=1
66
68 See "FUNCTIONS" in Math::PlanePath for the behaviour common to all path
69 classes.
70
71 "$path = Math::PlanePath::WythoffPreliminaryTriangle->new ()"
72 Create and return a new path object.
73
75 Entries in Sloane's Online Encyclopedia of Integer Sequences related to
76 this path include
77
78 <http://oeis.org/A165360> (etc)
79
80 A165360 X
81 A165359 Y
82 A166309 N by rows
83 A173027 N on Y axis
84
86 Math::PlanePath, Math::PlanePath::WythoffArray
87
89 <http://user42.tuxfamily.org/math-planepath/index.html>
90
92 Copyright 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Kevin Ryde
93
94 This file is part of Math-PlanePath.
95
96 Math-PlanePath is free software; you can redistribute it and/or modify
97 it under the terms of the GNU General Public License as published by
98 the Free Software Foundation; either version 3, or (at your option) any
99 later version.
100
101 Math-PlanePath is distributed in the hope that it will be useful, but
102 WITHOUT ANY WARRANTY; without even the implied warranty of
103 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
104 General Public License for more details.
105
106 You should have received a copy of the GNU General Public License along
107 with Math-PlanePath. If not, see <http://www.gnu.org/licenses/>.
108
109
110
111perl v5.38.0 Ma2t0h2:3:-P0l7a-n2e0Path::WythoffPreliminaryTriangle(3)