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 A243987 #29 Jan 02 2021 17:13:09 %S A243987 1,1,2,1,1,2,1,2,2,3,1,1,1,1,2,1,2,3,3,3,4,1,1,1,1,1,1,2,1,2,2,3,3,3, %T A243987 3,4,1,1,2,2,2,2,2,2,3,1,2,2,2,3,3,3,3,3,4,1,1,1,1,1,1,1,1,1,1,2,1,2, %U A243987 3,4,4,5,5,5,5,5,5,6,1,1,1,1,1,1,1,1,1,1,1,1,2,1,2,2,2,2,2,3,3,3,3,3,3,3,4,1,1,2,2,3,3,3,3,3,3,3,3,3,3,4 %N A243987 Triangle read by rows: T(n, k) is the number of divisors of n that are less than or equal to k for 1 <= k <= n. %C A243987 This triangular sequence T(n,k) generalizes sequence A000005, the number of divisors of n; in particular, A000005(n) = T(n,n). %C A243987 Also, for prime p, T(p,k) = 1 when k < p and T(p,p) = 2. %H A243987 Reinhard Zumkeller, <a href="/A243987/b243987.txt">Rows n = 1..125 of triangle, flattened</a> %H A243987 Dennis P. Walsh, <a href="http://capone.mtsu.edu/dwalsh/FACTORNK.pdf">Notes on counting the divisors of n</a> %F A243987 T(n,1) = 1; T(n,n) = A000005(n). %F A243987 T(n,k) = coefficient of the x^n term in the expansion of Sum(x^j/(1-x^j), j=1..k). %F A243987 T(n,k) = Sum_{j=1..k} A051731(n,j). - _Reinhard Zumkeller_, Apr 22 2015 %e A243987 T(6,4)=3 since there are 3 divisors of 6 that are less than or equal to 4, namely, 1, 2 and 3. %e A243987 T(n,k) as a triangle, n=1..15: %e A243987 1, %e A243987 1, 2, %e A243987 1, 1, 2, %e A243987 1, 2, 2, 3, %e A243987 1, 1, 1, 1, 2, %e A243987 1, 2, 3, 3, 3, 4, %e A243987 1, 1, 1, 1, 1, 1, 2, %e A243987 1, 2, 2, 3, 3, 3, 3, 4, %e A243987 1, 1, 2, 2, 2, 2, 2, 2, 3, %e A243987 1, 2, 2, 2, 3, 3, 3, 3, 3, 4 %e A243987 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, %e A243987 1, 2, 3, 4, 4, 5, 5, 5, 5, 5, 5, 6, %e A243987 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, %e A243987 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, %e A243987 1, 1, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4 %p A243987 T:=(n,k)->1/n!*eval(diff(sum(x^j/(1-x^j),j=1..k),x$n),x=0): %p A243987 seq(seq(T(n,k), k=1..n), n=1..10); %p A243987 # Alternative: %p A243987 IversonBrackets := expr -> subs(true=1, false=0, evalb(expr)): %p A243987 T := (n, k) -> add(IversonBrackets(irem(n, j) = 0), j = 1..k): %p A243987 for n from 1 to 19 do seq(T(n, k), k = 1..n) od; # _Peter Luschny_, Jan 02 2021 %o A243987 (PARI) T(n, k) = sumdiv(n, d, d<=k); \\ _Michel Marcus_, Jun 17 2014 %o A243987 (Haskell) %o A243987 a243987 n k = a243987_tabl !! (n-1) !! (k-1) %o A243987 a243987_row n = a243987_tabl !! (n-1) %o A243987 a243987_tabl = map (scanl1 (+)) a051731_tabl %o A243987 -- _Reinhard Zumkeller_, Apr 22 2015 %Y A243987 Cf. A000005 (diagonal), A000012 (first column), A081307 (row sums), A027750 (divisors of n). %Y A243987 Cf. A138553, A051731. %Y A243987 Cf. A340260, A340261. %K A243987 nonn,tabl %O A243987 1,3 %A A243987 _Dennis P. Walsh_, Jun 16 2014