login
A348712
Square array read by falling antidiagonals: T(n,k) is the number of bounded regions formed by the Lissajous curve x=cos(n*t), y=sin(k*t).
0
1, 2, 0, 3, 1, 3, 4, 1, 8, 0, 5, 2, 1, 0, 5, 6, 2, 18, 3, 14, 0, 7, 3, 23, 1, 23, 3, 7, 8, 3, 2, 6, 32, 0, 20, 0, 9, 4, 33, 1, 1, 8, 33, 0, 9, 10, 4, 38, 9, 50, 10, 46, 7, 26, 0, 11, 5, 3, 2, 59, 1, 59, 0, 3, 5, 11, 12, 5, 48, 12, 68, 15, 72, 14, 60, 9, 32, 0
OFFSET
1,2
FORMULA
T(n,k) = (n-1)*(k-1) + n*k when n is odd and GCD(n,k) = 1.
T(n,k) = (n-1)*(k-1)/2 when n is even and GCD(n,k) = 1.
T(n,k) = T(n/m,k/m) when GCD(n,k) = m.
EXAMPLE
Array begins:
+-----+---------------------------------------------------------------+
| n\k | 1 2 3 4 5 6 7 8 9 10 11 12 .. |
+-----+---------------------------------------------------------------+
| 1 | 1 2 3 4 5 6 7 8 9 10 11 12 .. |
| 2 | 0 1 1 2 2 3 3 4 4 5 5 6 .. |
| 3 | 3 8 1 18 23 2 33 38 3 48 53 4 .. |
| 4 | 0 0 3 1 6 1 9 2 12 2 15 3 .. |
| 5 | 5 14 23 32 1 50 59 68 77 2 95 104 .. |
| 6 | 0 3 0 8 10 1 15 18 1 23 25 2 .. |
| 7 | 7 20 33 46 59 72 1 98 111 124 137 150 .. |
| 8 | 0 0 7 0 14 3 21 1 28 6 35 1 .. |
| 9 | 9 26 3 60 77 8 111 128 1 162 179 18 .. |
| 10 | 0 5 9 14 0 23 27 32 36 1 45 50 .. |
| 11 | 11 32 53 74 95 116 137 158 179 200 1 242 .. |
| 12 | 0 0 0 3 22 0 33 8 3 10 55 1 .. |
| .. | .. .. .. .. .. .. .. .. .. .. .. .. .. |
+---------------------------------------------------------------------+
MAPLE
T := proc(n, k) option remember; igcd(n, k); if % = 1 then (n-1)*(k-1);
ifelse(n::even, % / 2, % + n*k) else T(n / %, k / %) fi end:
seq(seq(T(k, n - k + 1), k = 1..n), n = 1..12); # Peter Luschny, Oct 31 2021
MATHEMATICA
T[n_, k_] := T[n, k] = With[{m = GCD[n, k]}, Which[OddQ[n] && m == 1, (n-1)*(k-1)+n*k, EvenQ[n] && m == 1, (n-1)*(k-1)/2, True, T[n/m, k/m]]];
Table[Table[T[k, n - k + 1], {k, 1, n}], {n, 1, 12}] // Flatten (* Jean-François Alcover, Oct 28 2023 *)
CROSSREFS
Sequence in context: A212217 A211857 A292803 * A292801 A353396 A355533
KEYWORD
nonn,tabl,easy
AUTHOR
Mohammed Yaseen, Oct 31 2021
STATUS
approved