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.
%I A013942 #30 Sep 26 2022 09:20:48 %S A013942 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 A013942 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 A013942 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 A013942 Triangle of numbers T(n,k) = floor(2n/k), k=1..2n, read by rows. %C A013942 a(n) is also the leading term in period of continued fraction for n-th nonsquare. %C A013942 Row A026741(n) contains n and all rows with a smaller row number do not contain n. - _Reinhard Zumkeller_, Jun 04 2013 %H A013942 Reinhard Zumkeller, <a href="/A013942/b013942.txt">Rows n = 1..100 of table, flattened</a> %F A013942 T(n,k) = floor(2n/k), k=1,...,2n. %F A013942 T(n,k) = [1/{sqrt(k+n^2)}], k=1,2,...,2n, {}=fractional part, []=floor. %e A013942 First four rows: %e A013942 2 1 %e A013942 4 2 1 1 %e A013942 6 3 2 1 1 1 %e A013942 8 4 2 2 1 1 1 1 %e A013942 ... %t A013942 f[n_,h_]:=FractionalPart[(n^2+h)^(1/2)]; %t A013942 g[n_,h_]:=Floor[1/f[n,h]]; %t A013942 TableForm[Table[g[n,h],{n,1,13},{h,1,2n}]] %o A013942 (Haskell) %o A013942 a013942 n k = a013942_tabf !! (n-1) !! (k-1) %o A013942 a013942_row n = map (div (n * 2)) [1 .. 2 * n] %o A013942 a013942_tabf = map a013942_row [1 ..] %o A013942 -- _Reinhard Zumkeller_, Jun 04 2013 %o A013942 (PARI) T(n, k) = 2*n\k; %o A013942 tabf(nn) = for (n=1, nn, for (k=1, 2*n, print1(T(n,k), ", ")); print()); \\ _Michel Marcus_, Sep 30 2016 %Y A013942 Cf. A010766. %Y A013942 Cf. A005843 (row lengths and left edge), A062550 (row sums). %K A013942 nonn,tabf,easy,nice %O A013942 1,1 %A A013942 _Clark Kimberling_ %E A013942 Keyword tabl replaced by tabf and missing a(90)=1 inserted by _Reinhard Zumkeller_, Jun 04 2013