NAME
Math::PlanePath::WythoffPreliminaryTriangle -- Wythoff row containing X,Y recurrence
SYNOPSIS
use Math::PlanePath::WythoffPreliminaryTriangle;my $path = Math::PlanePath::WythoffPreliminaryTriangle->new;my ($x, $y) = $path->n_to_xy (123);
DESCRIPTION
This path is the Wythoff preliminary triangle by Clark Kimberling,
13 | 105 118 131 144 60 65 70 75 80 85 90 95 10012 | 97 110 47 52 57 62 67 72 77 82 87 9211 | 34 39 44 49 54 59 64 69 74 79 8410 | 31 36 41 46 51 56 61 66 71 769 | 28 33 38 43 48 53 58 63 268 | 25 30 35 40 45 50 55 237 | 22 27 32 37 42 18 206 | 19 24 29 13 15 175 | 16 21 10 12 144 | 5 7 9 113 | 4 6 82 | 3 21 | 1Y=0 |+-----------------------------------------------------X=0 1 2 3 4 5 6 7 8 9 10 11 12
A given N is at an X,Y position in the triangle according to where row number N of the Wythoff array "precurses" back to. Each Wythoff row is a Fibonacci recurrence. Starting from the pair of values in the first and second columns of row N it can be run in reverse by
F[i-1] = F[i+i] - F[i]
It can be shown that such a reverse always reaches a pair Y and X with Y>=1 and 0<=X<Y, hence making the triangular X,Y arrangement above.
N=7 WythoffArray row 7 is 17,28,45,73,...go backwards from 17,28 by subtraction11 = 28 - 176 = 17 - 115 = 11 - 61 = 6 - 54 = 5 - 1stop on reaching 4,1 which is Y=4,X=1 with Y>=1 and 0<=X<Y
Conversely a coordinate pair X,Y is reckoned as the start of a Fibonacci style recurrence,
F[i+i] = F[i] + F[i-1] starting F[1]=Y, F[2]=X
Iterating these values gives a row of the Wythoff array (Math::PlanePath::WythoffArray) after some initial iterations. The N value at X,Y is the row number of the Wythoff array which is reached. Rows are numbered starting from 1. For example,
Y=4,X=1 sequence: 4, 1, 5, 6, 11, 17, 28, 45, ...row 7 of WythoffArray: 17, 28, 45, ...so N=7 at Y=4,X=1
FUNCTIONS
See "FUNCTIONS" in Math::PlanePath for the behaviour common to all path classes.
- "$path = Math::PlanePath::WythoffPreliminaryTriangle->new ()"
-
Create and return a new path object.
OEIS
Entries in Sloane's Online Encyclopedia of Integer Sequences related to this path include
<http://oeis.org/A165360> (etc)
A165360 XA165359 YA166309 N by rowsA173027 N on Y axis
SEE ALSO
Math::PlanePath, Math::PlanePath::WythoffArray
HOME PAGE
<http://user42.tuxfamily.org/math-planepath/index.html>
LICENSE
Copyright 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Kevin Ryde
This file is part of Math-PlanePath.
Math-PlanePath 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-PlanePath 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-PlanePath. If not, see <http://www.gnu.org/licenses/>.