cp's OEIS Frontend

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.

Showing 1-4 of 4 results.

A127108 Triangle read by rows, A127099 * A000012.

Original entry on oeis.org

1, 5, 2, 7, 3, 3, 17, 10, 4, 4, 11, 5, 5, 5, 5, 35, 23, 15, 6, 6, 6, 15, 7, 7, 7, 7, 7, 7, 49, 34, 20, 20, 8, 8, 8, 8, 34, 21, 21, 9, 9, 9, 9, 9, 9, 55, 37, 25, 25, 25, 10, 10, 10, 10, 10, 23, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 119, 91, 67, 46, 30, 30, 12, 12, 12, 12, 12, 12
Offset: 0

Views

Author

Gary W. Adamson, Jan 05 2007, Jul 27 2008

Keywords

Comments

The operation A000012 * A127099 generates n-th row of the triangle by taking partial sums of n-th row of triangle A127099. Row 4 of A127099 (7, 6, 0, 4) becomes row 4 of A127108: (17, 10, 4, 4).
Row sums = A001001: (1, 7, 13, 35, 31, 91, ...).
Left column of the triangle = A060640: (1, 5, 7, 17, 11, 35, ...).

Examples

			First few rows of the triangle:
   1;
   5,  2;
   7,  3,  3;
  17, 10,  4,  4;
  11,  5,  5,  5,  5;
  35, 23, 15,  6,  6,  6;
  15,  7,  7,  7,  7,  7,  7;
  49, 34, 20, 20,  8,  8,  8,  8;
  34, 21, 21,  9,  9,  9,  9,  9,  9;
  55, 37, 25, 25, 25, 10, 10, 10, 10, 10;
  ...
		

Crossrefs

Formula

Triangle read by rows, A127099 * A000012.

Extensions

Edited by N. J. A. Sloane, Aug 13 2008 at the suggestion of R. J. Mathar

A127093 Triangle read by rows: T(n,k)=k if k is a divisor of n; otherwise, T(n,k)=0 (1 <= k <= n).

Original entry on oeis.org

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, 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, 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
Offset: 1

Views

Author

Gary W. Adamson, Jan 05 2007, Apr 04 2007

Keywords

Comments

Sum of terms in row n = sigma(n) (sum of divisors of n).
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), ...).
[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) + ...
Finally, Euler expands each term of t into a geometric series, getting A127093 in polynomial form: t =
x + x^2 + x^3 + x^4 + x^5 + x^6 + x^7 + x^8 + ...
+ 2x^2 + 2x^4 + 2x^6 + 2x^8 + ...
+ 3x^3 + 3x^6 + ...
+ 4x^4 + 4x^8 + ...
+ 5x^5 + ...
+ 6x^6 + ...
+ 7x^7 + ...
+ 8x^8 + ...
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
From Davis Smith, Mar 11 2019: (Start)
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.
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)
From Gary W. Adamson, Aug 07 2019: (Start)
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, ...).
As to row terms in the triangle, let E(n) of even terms = 0,
E(integers of the form 4*k - 1 = (-1), and E(integers of the form 4*k + 1 = 1.
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).
To get A004018, multiply the result by 4, getting A004018(10) = 8.
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)
T(n,k) is also the number of parts in the partition of n into k equal parts. - Omar E. Pol, May 05 2020

Examples

			T(8,4) = 4 since 4 divides 8.
T(9,3) = 3 since 3 divides 9.
First few rows of the triangle:
  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, 0, 8;
  1, 0, 3, 0, 0, 0, 0, 0, 9;
  ...
		

References

  • David Wells, "Prime Numbers, the Most Mysterious Figures in Math", John Wiley & Sons, 2005, appendix.
  • 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.

Crossrefs

Reversal = A127094
Cf. A027750.
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).

Programs

  • Excel
    mod(row()-1;column()) - mod(row();column()) + 1 - Mats Granvik, Aug 31 2007
    
  • Haskell
    a127093 n k = a127093_row n !! (k-1)
    a127093_row n = zipWith (*) [1..n] $ map ((0 ^) . (mod n)) [1..n]
    a127093_tabl = map a127093_row [1..]
    -- Reinhard Zumkeller, Jan 15 2011
    
  • Maple
    A127093:=proc(n,k) if type(n/k, integer)=true then k else 0 fi end:
    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
  • Mathematica
    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 *)
    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 *)
  • PARI
    trianglerows(n) = for(x=1, n, for(k=1, x, if(x%k==0, print1(k, ", "), print1("0, "))); print(""))
    /* Print initial 9 rows of triangle as follows: */
    trianglerows(9) \\ Felix Fröhlich, Mar 26 2019

Formula

k-th column is composed of "k" interspersed with (k-1) zeros.
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
T(n,k) = ((n-1) mod k) - (n mod k) + 1 (1 <= k <= n). - Mats Granvik, Aug 31 2007
T(n,k) = k * 0^(n mod k). - Reinhard Zumkeller, Jan 15 2011
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
T(n,k) = Sum_{d|k} mu(k/d)*sigma(gcd(n,d)). - Ridouane Oudra, Apr 05 2025

A060640 If n = Product p_i^e_i then a(n) = Product (1 + 2*p_i + 3*p_i^2 + ... + (e_i+1)*p_i^e_i).

Original entry on oeis.org

1, 5, 7, 17, 11, 35, 15, 49, 34, 55, 23, 119, 27, 75, 77, 129, 35, 170, 39, 187, 105, 115, 47, 343, 86, 135, 142, 255, 59, 385, 63, 321, 161, 175, 165, 578, 75, 195, 189, 539, 83, 525, 87, 391, 374, 235, 95, 903, 162, 430, 245, 459, 107, 710, 253, 735, 273, 295, 119
Offset: 1

Views

Author

N. J. A. Sloane, Apr 17 2001

Keywords

Comments

Equals row sums of triangle A143313. - Gary W. Adamson, Aug 06 2008
Equals row sums of triangle A127099. - Gary W. Adamson, Jul 27 2008
Sum of the divisors d2 from the ordered pairs of divisors of n, (d1,d2) with d1<=d2, such that d1|d2. - Wesley Ivan Hurt, Mar 22 2022

Examples

			a(4) = a(2^2) = 1 + (2)*(2) + (3)*(2^2) = 17;
a(6) = a(2)*a(3) = (1 + (2)*(2))*(1+(2)*(3)) = (5)*(7) = 35.
a(6) = tau(1) + 2*tau(2) + 3*tau(3) + 6*tau(6) = 1 + 2*2 + 3*2 + 6*4 = 35.
		

References

  • D. M. Burton, Elementary Number Theory, Allyn and Bacon Inc., Boston, MA, 1976, p. 120.

Crossrefs

Cf. A000005, A000203, A001001, A006171, A038040 (Mobius transform), A049060, A057660, A057723, A327960 (Dirichlet inverse).
Cf. also triangles A027750, A127099, A143313.

Programs

  • Haskell
    a060640 n = sum [d * a000005 d | d <- a027750_row n]
    -- Reinhard Zumkeller, Feb 29 2012
    
  • Maple
    A060640 := proc(n) local ans, i, j; ans := 1: for i from 1 to nops(ifactors(n)[2]) do ans := ans*(1+sum((j+1)*ifactors(n)[2][i][1]^j,j=1..ifactors(n)[2][i][2])): od: RETURN(ans) end:
  • Mathematica
    a[n_] := Total[#*DivisorSigma[1, n/#] & /@ Divisors[n]];
    a /@ Range[59] (* Jean-François Alcover, May 19 2011, after Vladeta Jovovic *)
    f[p_, e_] := ((e + 1)*p^(e + 2) - (e + 2)*p^(e + 1) + 1)/(p - 1)^2; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Apr 10 2022 *)
  • PARI
    j=[]; for(n=1,200,j=concat(j,sumdiv(n,d,n/d*sigma(d)))); j
    
  • PARI
    a(n)=if(n<1,0,direuler(p=2,n,1/(1-X)/(1-p*X)^2)[n]) /* Ralf Stephan */
    
  • PARI
    N=66; default(seriesprecision,N); x=z+O(z^(N+1))
    c=sum(j=1,N,j*x^j); t=1/prod(j=1,N, eta(x^(j)));
    t=log(t);t=serconvol(t,c);
    Vec(t) /* Joerg Arndt, May 03 2008 */
    
  • PARI
    { for (n=1, 1000, write("b060640.txt", n, " ", direuler(p=2, n, 1/(1 - X)/(1 - p*X)^2)[n]); ) } /* Harry J. Smith, Jul 08 2009 */
    
  • Sage
    def A060640(n) :
        sigma = sloane.A000203
        return add(sigma(k)*(n/k) for k in divisors(n))
    [A060640(i) for i in (1..59)] # Peter Luschny, Sep 15 2012

Formula

a(n) = Sum_{d|n} d*tau(d), where tau(d) is the number of divisors of d, cf. A000005. a(n) = Sum_{d|n} d*sigma(n/d), where sigma(n)=sum of divisors of n, cf. A000203. - Vladeta Jovovic, Apr 23 2001
Multiplicative with a(p^e) = ((e+1)*p^{e+2} - (e+2)*p^{e+1} + 1) / (p-1)^2. Dirichlet g.f.: zeta(s)*zeta(s-1)^2. - Franklin T. Adams-Watters, Aug 03 2006
L.g.f.: Sum(A060640(n)*x^n/n) = -log( Product_{j>=1} P(x^j) ) where P(x) = Product_{k>=1} (1-x^k). - Joerg Arndt, May 03 2008
G.f.: Sum_{k>=1} k*tau(k)*x^k/(1 - x^k). - Ilya Gutkovskiy, Sep 06 2018
Sum_{k=1..n} a(k) ~ n^2/24 * ((4*gamma - 1)*Pi^2 + 2*Pi^2 * log(n) + 12*Zeta'(2)), where gamma is the Euler-Mascheroni constant A001620. - Vaclav Kotesovec, Feb 01 2019

Extensions

More terms from James Sellers, Vladeta Jovovic and Matthew Conroy, Apr 17 2001

A123229 Triangle read by rows: T(n, m) = n - (n mod m).

Original entry on oeis.org

1, 2, 2, 3, 2, 3, 4, 4, 3, 4, 5, 4, 3, 4, 5, 6, 6, 6, 4, 5, 6, 7, 6, 6, 4, 5, 6, 7, 8, 8, 6, 8, 5, 6, 7, 8, 9, 8, 9, 8, 5, 6, 7, 8, 9, 10, 10, 9, 8, 10, 6, 7, 8, 9, 10, 11, 10, 9, 8, 10, 6, 7, 8, 9, 10, 11, 12, 12, 12, 12, 10, 12, 7, 8, 9, 10, 11, 12, 13, 12, 12, 12, 10, 12, 7, 8, 9, 10, 11, 12, 13
Offset: 1

Views

Author

Roger L. Bagula and Gary W. Adamson, Oct 06 2006

Keywords

Comments

An equivalent definition: Consider A000012 as a lower-left all-1's triangle, and build the matrix product by multiplication with A127093 from the right. That is, T(n,m) = Sum_{j=m..n} A000012(n,j)*A127093(j,m) = Sum_{j=m..n} A127093(j,m) = m*floor(n/m) = m*A010766(n,m). - Gary W. Adamson, Jan 05 2007
The number of parts k in the triangle is A000203(k) hence the sum of parts k is A064987(k). - Omar E. Pol, Jul 05 2014

Examples

			Triangle begins:
{1},
{2, 2},
{3, 2, 3},
{4, 4, 3, 4},
{5, 4, 3, 4, 5},
{6, 6, 6, 4, 5, 6},
{7, 6, 6, 4, 5, 6, 7},
{8, 8, 6, 8, 5, 6, 7, 8},
{9, 8, 9, 8, 5, 6, 7, 8, 9},
...
		

Crossrefs

Programs

  • GAP
    Flat(List([1..10],n->List([1..n],m->n-(n mod m)))); # Muniru A Asiru, Oct 12 2018
  • Maple
    seq(seq(n-modp(n,m),m=1..n),n=1..13); # Muniru A Asiru, Oct 12 2018
  • Mathematica
    a = Table[Table[n - Mod[n, m], {m, 1, n}], {n, 1, 20}]; Flatten[a]
  • PARI
    for(n=1,9,for(m=1,n,print1(n-n%m", "))) \\ Charles R Greathouse IV, Nov 07 2011
    

Extensions

Edited by N. J. A. Sloane, Jul 05 2014 at the suggestion of Omar E. Pol, who observed that A127095 (Gary W. Adamson, with edits by R. J. Mathar) was the same as this sequence.
Showing 1-4 of 4 results.