NAME

Math::PlanePath::MathImageDivisibleColumns -- x divisible by y in columns

SYNOPSIS

use Math::PlanePath::MathImageDivisibleColumns;
my $path = Math::PlanePath::MathImageDivisibleColumns->new;
my ($x, $y) = $path->n_to_xy (123);

DESCRIPTION

This path visits points X,Y where X is divisible by Y, in columns from Y=1 to Y<=X.

18 |                                                      57
17 |                                                   51
16 |                                                49
15 |                                             44
14 |                                          40
13 |                                       36
12 |                                    34
11 |                                 28
10 |                              26
 9 |                           22                         56
 8 |                        19                      48
 7 |                     15                   39
 6 |                  13                33                55
 5 |                9             25             43
 4 |             7          18          32          47
 3 |          4       12       21       31       42       54
 2 |       2     6    11    17    24    30    38    46    53
 1 |    0  1  3  5  8 10 14 16 20 23 27 29 35 37 41 45 50 52
Y=0|
   +---------------------------------------------------------
   X=0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18

The number of divisors in each column is ..., and starting N=0 at X=1,Y=1 means the values 1,3,5,8,etc horizontally along X=1 are the sums

 i=K
sum   numdivisors(i)
 i=1

The pattern of divisors or not is the same going up a column as going down, since X,X-Y has the same coprimeness as X,Y. This means coprimes occur in pairs from X=3 onwards. (In X even the middle point Y=X/2 is not coprime since they have common factor 2, from X=4 onwards.) So there's an even number of points in each column from X=2 onwards and the totals horizontally along X=1 are even likewise.

The current implementation is pretty slack and is fairly slow on medium to large N, but the resulting pattern is interesting. Anything making a straight line etc in the path will probably have to be related to phi sums in some way.

FUNCTIONS

See "FUNCTIONS" in Math::PlanePath for the behaviour common to all path classes.

$path = Math::PlanePath::MathImageDivisibleColumns->new ()

Create and return a new path object.

($x,$y) = $path->n_to_xy ($n)

Return the X,Y coordinates of point number $n on the path. Points begin at 0 and if $n < 0 then the return is an empty list.

SEE ALSO

Math::PlanePath, Math::PlanePath::CoprimeColumns