Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #113 Dec 18 2022 12:32:10
%S 1,1,2,1,0,3,1,2,0,4,1,0,0,0,5,1,2,3,0,0,6,1,0,0,0,0,0,7,1,2,0,4,0,0,
%T 0,8,1,0,3,0,0,0,0,0,9,1,2,0,0,5,0,0,0,0,10,1,0,0,0,0,0,0,0,0,0,11,1,
%U 2,3,4,0,6,0,0,0,0,0,12,1,0,0,0,0,0,0,0,0,0,0,0,13,1,2,0,0,0,0,7,0,0,0,0,0,0,14
%N Triangle read by rows: T(n,k)=k if k is a divisor of n; otherwise, T(n,k)=0 (1 <= k <= n).
%C Sum of terms in row n = sigma(n) (sum of divisors of n).
%C Euler's derivation of A127093 in polynomial form is in his proof of the formula for Sigma(n): (let S=Sigma, then Euler proved that S(n) = S(n-1) + S(n-2) - S(n-5) - S(n-7) + S(n-12) + S(n-15) - S(n-22) - S(n-26), ...).
%C [Young, pp. 365-366], Euler begins, s = (1-x)*(1-x^2)*(1-x^3)*... = 1 - x - x^2 + x^5 + x^7 - x^12 ...; log s = log(1-x) + log(1-x^2) + log(1-x^3) ...; differentiating and then changing signs, Euler has t = x/(1-x) + 2x^2/(1-x^2) + 3x^3/(1-x^3) + 4x^4/(1-x^4) + 5x^5/(1-x^5) + ...
%C Finally, Euler expands each term of t into a geometric series, getting A127093 in polynomial form: t =
%C x + x^2 + x^3 + x^4 + x^5 + x^6 + x^7 + x^8 + ...
%C + 2x^2 + 2x^4 + 2x^6 + 2x^8 + ...
%C + 3x^3 + 3x^6 + ...
%C + 4x^4 + 4x^8 + ...
%C + 5x^5 + ...
%C + 6x^6 + ...
%C + 7x^7 + ...
%C + 8x^8 + ...
%C T(n,k) is the sum of all the k-th roots of unity each raised to the n-th power. - _Geoffrey Critzer_, Jan 02 2016
%C From _Davis Smith_, Mar 11 2019: (Start)
%C For n > 1, A020639(n) is the leftmost term, other than 0 or 1, in the n-th row of this array. As mentioned in the Formula section, the k-th column is period k: repeat [k, 0, 0, ..., 0], but this also means that it's the characteristic function of the multiples of k multiplied by k. T(n,1) = A000012(n), T(n,2) = 2*A059841(n), T(n,3) = 3*A079978(n), T(n,4) = 4*A121262(n), T(n,5) = 5*A079998(n), and so on.
%C The terms in the n-th row, other than 0, are the factors of n. If n > 1 and for every k, 1 <= k < n, T(n,k) = 0 or 1, then n is prime. (End)
%C From _Gary W. Adamson_, Aug 07 2019: (Start)
%C Row terms of the triangle can be used to calculate E(n) in A002654): (1, 1, 0, 1, 2, 0, 0, 1, 1, 2, ...), and A004018, the number of points in a square lattice on the circle of radius sqrt(n), A004018: (1, 4, 4, 0, 4, 8, 0, 0, 4, ...).
%C As to row terms in the triangle, let E(n) of even terms = 0,
%C E(integers of the form 4*k - 1 = (-1), and E(integers of the form 4*k + 1 = 1.
%C Then E(n) is the sum of the E(n)'s of the factors of n in the triangle rows. Example: E(10) = Sum: ((E(1) + E(2) + E(5) + E(10)) = ((1 + 0 + 1 + 0) = 2, matching A002654(10).
%C To get A004018, multiply the result by 4, getting A004018(10) = 8.
%C The total numbers of lattice points = 4r^2 = E(1) + ((E(2))/2 + ((E(3))/3 + ((E(4))/4 + ((E(5))/5 + .... Since E(even integers) are zero, E(integers of the form (4*k - 1)) = (-1), and E(integers of the form (4*k + 1)) = (+1); we are left with 4r^2 = 1 - 1/3 + 1/5 - 1/7 + 1/9 - ..., which is approximately equal to Pi(r^2). (End)
%C T(n,k) is also the number of parts in the partition of n into k equal parts. - _Omar E. Pol_, May 05 2020
%D David Wells, "Prime Numbers, the Most Mysterious Figures in Math", John Wiley & Sons, 2005, appendix.
%D L. Euler, "Discovery of a Most Extraordinary Law of the Numbers Concerning the Sum of Their Divisors"; pp. 358-367 of Robert M. Young, "Excursions in Calculus, An Interplay of the Continuous and the Discrete", MAA, 1992. See p. 366.
%H Reinhard Zumkeller, <a href="/A127093/b127093.txt">Rows n = 1..100 of triangle, flattened</a>
%H Grant Sanderson, <a href="https://www.3blue1brown.com/lessons/leibniz-formula">Pi hiding in prime regularities</a>
%H Leonhard Euler, <a href="http://eulerarchive.maa.org/pages/E175.html">Découverte d'une loi tout extraordinaire des nombres par rapport à la somme de leurs diviseurs</a>, 1747, The Euler Archive, (Eneström Index) E175.
%H Leonhard Euler, <a href="http://eulerarchive.maa.org//pages/E243.html">Observatio de summis divisorum</a>
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/Divisor.html">Divisor</a>
%F k-th column is composed of "k" interspersed with (k-1) zeros.
%F Let M = A127093 as an infinite lower triangular matrix and V = the harmonic series as a vector: [1/1, 1/2, 1/3, ...]. then M*V = d(n), A000005: [1, 2, 2, 3, 2, 4, 2, 4, 3, 4, ...]. M^2 * V = A060640: [1, 5, 7, 17, 11, 35, 15, 49, 34, 55, ...]. - _Gary W. Adamson_, May 10 2007
%F T(n,k) = ((n-1) mod k) - (n mod k) + 1 (1 <= k <= n). - _Mats Granvik_, Aug 31 2007
%F T(n,k) = k * 0^(n mod k). - _Reinhard Zumkeller_, Jan 15 2011
%F G.f.: Sum_{k>=1} k * x^k * y^k/(1-x^k) = Sum_{m>=1} x^m * y/(1 - x^m*y)^2. - _Robert Israel_, Aug 08 2016
%e T(8,4) = 4 since 4 divides 8.
%e T(9,3) = 3 since 3 divides 9.
%e First few rows of the triangle:
%e 1;
%e 1, 2;
%e 1, 0, 3;
%e 1, 2, 0, 4;
%e 1, 0, 0, 0, 5;
%e 1, 2, 3, 0, 0, 6;
%e 1, 0, 0, 0, 0, 0, 7;
%e 1, 2, 0, 4, 0, 0, 0, 8;
%e 1, 0, 3, 0, 0, 0, 0, 0, 9;
%e ...
%p A127093:=proc(n,k) if type(n/k, integer)=true then k else 0 fi end:
%p for n from 1 to 16 do seq(A127093(n,k),k=1..n) od; # yields sequence in triangular form - _Emeric Deutsch_, Jan 20 2007
%t t[n_, k_] := k*Boole[Divisible[n, k]]; Table[t[n, k], {n, 1, 14}, {k, 1, n}] // Flatten (* _Jean-François Alcover_, Jan 17 2014 *)
%t Table[ SeriesCoefficient[k*x^k/(1 - x^k), {x, 0, n}], {n, 1, 14}, {k, 1, n}] // Flatten (* _Jean-François Alcover_, Apr 14 2015 *)
%o (Excel) mod(row()-1;column()) - mod(row();column()) + 1 - _Mats Granvik_, Aug 31 2007
%o (Haskell)
%o a127093 n k = a127093_row n !! (k-1)
%o a127093_row n = zipWith (*) [1..n] $ map ((0 ^) . (mod n)) [1..n]
%o a127093_tabl = map a127093_row [1..]
%o -- _Reinhard Zumkeller_, Jan 15 2011
%o (PARI) trianglerows(n) = for(x=1, n, for(k=1, x, if(x%k==0, print1(k, ", "), print1("0, "))); print(""))
%o /* Print initial 9 rows of triangle as follows: */
%o trianglerows(9) \\ _Felix Fröhlich_, Mar 26 2019
%Y Reversal = A127094
%Y Cf. A127094, A123229, A127096, A127097, A127098, A127099, A000203, A126988, A127013, A127057, A038040, A024916, A060640, A001001.
%Y Cf. A000005, A060640.
%Y Cf. A027750.
%Y Cf. A000012 (the first column), A020639, A059841 (the second column when multiplied by 2), A079978 (the third column when multiplied by 2), A079998 (the fifth column when multiplied by 5), A121262 (the fourth column when multiplied by 4).
%Y Cf. A002654, A004018.
%K nonn,easy,tabl
%O 1,3
%A _Gary W. Adamson_, Jan 05 2007, Apr 04 2007