A127170 Triangle read by rows: T(n,k) is the number of divisors of n that are divisible by k, with 1 <= k <= n.
1, 2, 1, 2, 0, 1, 3, 2, 0, 1, 2, 0, 0, 0, 1, 4, 2, 2, 0, 0, 1, 2, 0, 0, 0, 0, 0, 1, 4, 3, 0, 2, 0, 0, 0, 1, 3, 0, 2, 0, 0, 0, 0, 0, 1, 4, 2, 0, 0, 2, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 6, 4, 3, 2, 0, 2, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 4, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 1
Offset: 1
Examples
First 10 rows of the triangle: 1; 2, 1; 2, 0, 1; 3, 2, 0, 1; 2, 0, 0, 0, 1; 4, 2, 2, 0, 0, 1; 2, 0, 0, 0, 0, 0, 1; 4, 3, 0, 2, 0, 0, 0, 1; 3, 0, 2, 0, 0, 0, 0, 0, 1; 4, 2, 0, 0, 2, 0, 0, 0, 0, 1; ...
Links
- Michael De Vlieger, Table of n, a(n) for n = 1..11325 (rows n = 1..150, flattened)
Programs
-
Maple
T:= (n, k)-> `if`(irem(n, k)=0, numtheory[tau](n/k), 0): seq(seq(T(n, k), k=1..n), n=1..14); # Alois P. Heinz, Feb 16 2022
-
Mathematica
Table[Function[D, Table[Count[D, ?(Mod[#, k] == 0 &)], {k, n}]]@ Divisors[n], {n, 12}] // Flatten (* _Michael De Vlieger, Feb 16 2022 *)
-
PARI
tabl(nn) = {m = matrix(nn, nn, n, k, if ((n % k) == 0, 1, 0)); m = m^2; for (n=1, nn, for (k=1, n, print1(m[n, k], ", ");); print(););} \\ Michel Marcus, Apr 01 2015
Formula
A007429(n) = Sum_{i=1..n} i*a(i).
T(n,k) = A000005(n/k), if k divides n, otherwise 0, with n >= 1 and 1 <= k <= n. - Omar E. Pol, Apr 01 2015
Extensions
8 terms taken from Example section and then corrected in Data section by Omar E. Pol, Mar 30 2015
Extended beyond a(21) by Omar E. Pol, Apr 01 2015
New name (which was a comment dated Mar 30 2015) from Omar E. Pol, Feb 16 2022
Comments