login
Triangle of numbers T(n,k) = floor(2n/k), k=1..2n, read by rows.
7

%I #30 Sep 26 2022 09:20:48

%S 2,1,4,2,1,1,6,3,2,1,1,1,8,4,2,2,1,1,1,1,10,5,3,2,2,1,1,1,1,1,12,6,4,

%T 3,2,2,1,1,1,1,1,1,14,7,4,3,2,2,2,1,1,1,1,1,1,1,16,8,5,4,3,2,2,2,1,1,

%U 1,1,1,1,1,1,18,9,6,4,3,3,2,2,2,1,1,1,1,1,1,1,1,1,20,10,6,5,4,3

%N Triangle of numbers T(n,k) = floor(2n/k), k=1..2n, read by rows.

%C a(n) is also the leading term in period of continued fraction for n-th nonsquare.

%C Row A026741(n) contains n and all rows with a smaller row number do not contain n. - _Reinhard Zumkeller_, Jun 04 2013

%H Reinhard Zumkeller, <a href="/A013942/b013942.txt">Rows n = 1..100 of table, flattened</a>

%F T(n,k) = floor(2n/k), k=1,...,2n.

%F T(n,k) = [1/{sqrt(k+n^2)}], k=1,2,...,2n, {}=fractional part, []=floor.

%e First four rows:

%e 2 1

%e 4 2 1 1

%e 6 3 2 1 1 1

%e 8 4 2 2 1 1 1 1

%e ...

%t f[n_,h_]:=FractionalPart[(n^2+h)^(1/2)];

%t g[n_,h_]:=Floor[1/f[n,h]];

%t TableForm[Table[g[n,h],{n,1,13},{h,1,2n}]]

%o (Haskell)

%o a013942 n k = a013942_tabf !! (n-1) !! (k-1)

%o a013942_row n = map (div (n * 2)) [1 .. 2 * n]

%o a013942_tabf = map a013942_row [1 ..]

%o -- _Reinhard Zumkeller_, Jun 04 2013

%o (PARI) T(n, k) = 2*n\k;

%o tabf(nn) = for (n=1, nn, for (k=1, 2*n, print1(T(n,k), ", ")); print()); \\ _Michel Marcus_, Sep 30 2016

%Y Cf. A010766.

%Y Cf. A005843 (row lengths and left edge), A062550 (row sums).

%K nonn,tabf,easy,nice

%O 1,1

%A _Clark Kimberling_

%E Keyword tabl replaced by tabf and missing a(90)=1 inserted by _Reinhard Zumkeller_, Jun 04 2013