OFFSET
0,5
COMMENTS
These are the lattice paths that move in straight lines between grid points. No distinction is made between a path passing through a grid point and a path stopping at the grid point. For example the path (0,0)->(2,2) is considered the same as (0,0)->(1,1)->(2,2).
LINKS
Andrew Howroyd, Table of n, a(n) for n = 0..1325 (rows 0..50)
EXAMPLE
Triangle begins:
1;
1, 1;
1, 3, 1;
1, 6, 6, 1;
1, 10, 17, 10, 1;
1, 15, 39, 39, 15, 1;
...
There are three paths across a one by one lattice. There are six across a two by one lattice.
MAPLE
b:= proc(n, k) option remember; `if`(min(n, k)=0, 1, add(add(
`if`(igcd(i, j)=1, b(n-i, k-j), 0), j=0..k), i=0..n))
end:
T:= (n, k)-> b(k, n-k):
seq(seq(T(n, k), k=0..n), n=0..10); # Alois P. Heinz, Apr 26 2023
PROG
(PARI)
T(n)={my(v=vector(n)); v[1]=[1]; for(n=2, #v, v[n]=vector(n, k, sum(i=0, k-1, sum(j=0, n-k, if(gcd(i, j)==1, v[n-i-j][k-i] ) )))); v}
{ my(A=T(10)); for(i=1, #A, print(A[i])) } \\ Andrew Howroyd, Apr 12 2023
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Keith S. Reid, Apr 12 2023
STATUS
approved