%I #6 Oct 27 2023 22:00:46
%S 1,2,1,3,4,1,4,2,6,1,5,6,7,8,1,6,3,2,4,10,1,7,8,9,10,11,12,1,8,4,10,2,
%T 12,6,14,1,9,10,3,12,13,4,15,16,1,10,5,12,6,2,7,16,8,18,1,11,12,13,14,
%U 15,16,17,18,19,20,1,12,6,4,3,16,2,18,4,6,10,22,1,13,14,15,16
%N Table B(n,m) read by rows: B(n,m) = LCM(n,m)/n + LCM(n,m)/m - 1 for all 1<=m<=n.
%C In an n X m box, a ball makes B(n,m) "bounces" starting at one corner until it reaches another corner, only allowed to travel on diagonal grid lines. B(n+2,n) = A022998(n+1) for all n >= 1. B(2n-1,n) = A016777(n) = 3n + 1 for all n >= 1 (central vertical).
%p B := (n,m) -> lcm(n,m)/n + lcm(n,m)/m - 1: seq(seq(B(n,m), n=1..m),m=1..15);
%Y Cf. A022998, A059028, A059029, A059030, A059031.
%K nonn,easy,tabl
%O 1,2
%A _Asher Auel_, Dec 15 2000