cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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).

This page as a plain text file.
%I A348712 #16 Oct 28 2023 05:13:36
%S A348712 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,
%T A348712 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,
%U A348712 1,59,0,3,5,11,12,5,48,12,68,15,72,14,60,9,32,0
%N 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).
%H A348712 Wikipedia, <a href="https://en.wikipedia.org/wiki/Lissajous_curve">Lissajous curve</a>
%F A348712 T(n,k) = (n-1)*(k-1) + n*k when n is odd and GCD(n,k) = 1.
%F A348712 T(n,k) = (n-1)*(k-1)/2 when n is even and GCD(n,k) = 1.
%F A348712 T(n,k) = T(n/m,k/m) when GCD(n,k) = m.
%e A348712 Array begins:
%e A348712 +-----+---------------------------------------------------------------+
%e A348712 | n\k |  1    2    3    4    5    6    7    8    9   10   11   12  .. |
%e A348712 +-----+---------------------------------------------------------------+
%e A348712 |  1  |  1    2    3    4    5    6    7    8    9   10   11   12  .. |
%e A348712 |  2  |  0    1    1    2    2    3    3    4    4    5    5    6  .. |
%e A348712 |  3  |  3    8    1   18   23    2   33   38    3   48   53    4  .. |
%e A348712 |  4  |  0    0    3    1    6    1    9    2   12    2   15    3  .. |
%e A348712 |  5  |  5   14   23   32    1   50   59   68   77    2   95  104  .. |
%e A348712 |  6  |  0    3    0    8   10    1   15   18    1   23   25    2  .. |
%e A348712 |  7  |  7   20   33   46   59   72    1   98  111  124  137  150  .. |
%e A348712 |  8  |  0    0    7    0   14    3   21    1   28    6   35    1  .. |
%e A348712 |  9  |  9   26    3   60   77    8  111  128    1  162  179   18  .. |
%e A348712 | 10  |  0    5    9   14    0   23   27   32   36    1   45   50  .. |
%e A348712 | 11  | 11   32   53   74   95  116  137  158  179  200    1  242  .. |
%e A348712 | 12  |  0    0    0    3   22    0   33    8    3   10   55    1  .. |
%e A348712 | ..  |  ..  ..   ..   ..   ..   ..   ..   ..   ..   ..   ..   ..  .. |
%e A348712 +---------------------------------------------------------------------+
%p A348712 T := proc(n, k) option remember; igcd(n, k); if % = 1 then (n-1)*(k-1);
%p A348712 ifelse(n::even, % / 2, % + n*k) else T(n / %, k / %) fi end:
%p A348712 seq(seq(T(k, n - k + 1), k = 1..n), n = 1..12); # _Peter Luschny_, Oct 31 2021
%t A348712 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]]];
%t A348712 Table[Table[T[k, n - k + 1], {k, 1, n}], {n, 1, 12}] // Flatten (* _Jean-François Alcover_, Oct 28 2023 *)
%Y A348712 Cf. A007678, A300153.
%K A348712 nonn,tabl,easy
%O A348712 1,2
%A A348712 _Mohammed Yaseen_, Oct 31 2021