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-10 of 24 results. Next

A127478 Triangle T(n,k) read by rows: matrix product A054523 * A054522.

Original entry on oeis.org

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

Views

Author

Gary W. Adamson, Jan 15 2007

Keywords

Comments

If the two matrices A054523 and A054522 are commuted, the matrix product becomes A127477.

Examples

			First few rows of the triangle are:
.1;
.2, 1;
.3, 0, 2;
.4, 2, 0, 2;
.5, 0, 0, 0, 4;
.6, 3, 4, 0, 0, 2;
.7, 0, 0, 0, 0, 0, 6;
.8, 4, 0, 4, 0, 0, 0, 4;
....
		

Crossrefs

Programs

  • Maple
    A054522 := proc(n,k) if k = 1 then 1; elif n mod k = 0 then numtheory[phi](k) ; else 0 ; fi; end:
    A054523 := proc(n,k) if k = n then 1; elif n mod k = 0 then numtheory[phi](n/k) ; else 0 ; fi; end:
    A127478 := proc(n,k) add( A054523(n,j)*A054522(j,k), j=k..n) ; end: seq(seq( A127478(n,k),k=1..n),n=1..15) ;

Formula

T(n,k) = sum_{j=k..n} A054523(n,j) * A054522(j,k).
T(n,n) = A000010(n) (diagonal).
sum_{k=1..n} T(n,k) = A018804(n) (row sums).

Extensions

Converted comments to formulas, extended - R. J. Mathar, Sep 11 2009

A130585 A054522 * A007318.

Original entry on oeis.org

1, 2, 1, 3, 4, 2, 4, 7, 6, 2, 5, 16, 24, 16, 4, 6, 15, 22, 20, 10, 2, 7, 36, 90, 120, 90, 36, 6, 8, 35, 90, 142, 140, 84, 28, 4, 9, 52, 170, 336, 420, 336, 168, 48, 6, 10, 53, 168, 352, 508, 504, 336, 144, 36, 4
Offset: 0

Views

Author

Gary W. Adamson, Jun 06 2007

Keywords

Comments

A130584 = A007318 * A054522 Row sums = A130586: (1, 3, 9, 19, 65, 75, 385, ...).

Examples

			First few rows of the triangle:
  1;
  2,  1;
  3,  4,  2;
  4,  7,  6,   2;
  5, 16, 24,  16,  4;
  6, 15, 22,  20, 10,  2;
  7, 36, 90, 120, 90, 36, 6;
  ...
		

Crossrefs

Formula

A054522 * A007318 as infinite lower triangular matrices.

A130584 A007318 * A054522.

Original entry on oeis.org

1, 2, 1, 4, 2, 2, 8, 4, 6, 2, 16, 8, 12, 8, 4, 32, 16, 22, 20, 20, 2, 64, 32, 42, 40, 60, 12, 6, 128, 64, 84, 72, 140, 42, 42, 4, 256, 128, 170, 128, 280, 112, 168, 32, 6, 512, 256, 342, 240, 508, 252, 504, 144, 54, 4
Offset: 0

Views

Author

Gary W. Adamson, Jun 06 2007

Keywords

Examples

			First few rows of the triangle are:
1;
2, 1;
4, 2, 2;
8, 4, 6, 2;
16, 8, 12, 8, 4;
32, 16, 22, 20, 20, 2;
64, 32, 42, 40, 60, 12, 6;
...
		

Crossrefs

Cf. A007318, A054522, A001792 (row sums), A130585, A000010.

Formula

T(n,n)=A000010(n+1).
Binomial transform of A054522 as infinite lower triangular matrices.

A127477 Triangle T(n,k) read by rows: matrix product A054522 * A054523.

Original entry on oeis.org

1, 2, 1, 5, 0, 2, 6, 3, 0, 2, 17, 0, 0, 0, 4, 10, 5, 4, 0, 0, 2, 37, 0, 0, 0, 0, 0, 6, 22, 11, 0, 6, 0, 0, 0, 4, 41, 0, 14, 0, 0, 0, 0, 0, 6, 34, 17, 0, 0, 8, 0, 0, 0, 0, 4, 101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 30, 15, 12, 10, 0, 6, 0, 0, 0, 0, 0, 4, 145, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 74, 37, 0
Offset: 1

Views

Author

Gary W. Adamson, Jan 15 2007

Keywords

Comments

If the two matrices A054522 and A054523 are commuted, the matrix product becomes A127478.

Examples

			First few rows of the triangle are:
1;
2, 1;
5, 0, 2;
6, 3, 0, 2;
17, 0, 0, 0, 4;
10, 5, 4, 0, 0, 2;
37, 0, 0, 0, 0, 0, 6;
22, 11, 0, 6, 0, 0, 0, 4;
		

Crossrefs

Programs

  • Maple
    A054522 := proc(n,k) if k = 1 then 1; elif n mod k = 0 then numtheory[phi](k) ; else 0 ; fi; end:
    A054523 := proc(n,k) if k = n then 1; elif n mod k = 0 then numtheory[phi](n/k) ; else 0 ; fi; end:
    A127477 := proc(n,k) add( A054522(n,j)*A054523(j,k), j=k..n) ; end: seq(seq( A127477(n,k),k=1..n),n=1..15) ;

Formula

T(n,k) = sum_{j=k..n} A054522(n,j) * A054523(j,k).
sum_{k=1..n} T(n,k) = A057660(n) (row sums).
T(n,n) = A000010(n) (diagonal).
T(n,1) = A029939(n).

Extensions

Converted comments to formulas, extended - R. J. Mathar, Sep 11 2009

A130211 Triangle read by rows: matrix product A054522 * A000012.

Original entry on oeis.org

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

Views

Author

Gary W. Adamson, May 17 2007

Keywords

Examples

			First few rows of the triangle are:
1;
2, 1;
3, 2, 2;
4, 3, 2, 2;
5, 4, 4, 4, 4;
6, 5, 4, 2, 2, 2;
7, 6, 6, 6, 6, 6, 6;
8, 7, 6, 6, 4, 4, 4, 4;
...
		

Crossrefs

Cf. A000010, A054522, A130212 (product with swapped order), A057660 (row sums).

Programs

Formula

A054522 * A000012 as infinite lower triangular matrices.
T(n,n) = A000010(n).

A127471 Triangle formed from the matrix product A051731 * A054522 of infinite lower triangular matrices, read by rows.

Original entry on oeis.org

1, 2, 1, 2, 0, 2, 3, 2, 0, 2, 2, 0, 0, 0, 4, 4, 2, 4, 0, 0, 2, 2, 0, 0, 0, 0, 0, 6, 4, 3, 0, 4, 0, 0, 0, 4, 3, 0, 4, 0, 0, 0, 0, 0, 6, 4, 2, 0, 0, 8, 0, 0, 0, 0, 4, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 6, 4, 6, 4, 0, 4, 0, 0, 0, 0, 0, 4, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12
Offset: 1

Views

Author

Gary W. Adamson, Jan 15 2007

Keywords

Comments

Left column = (1, 2, 2, 3, 2, 4, ...) = d(n), A000005; right border = (1, 1, 2, 2, 4, 2, 6, ...) = phi(n), A000010; row sums = (1, 3, 4, 7, 6, 12, ...) = sigma(n), A000203.

Examples

			First few rows of the triangle:
  1;
  2, 1;
  2, 0, 2;
  3, 2, 0, 2;
  2, 0, 0, 0, 4;
  4, 2, 4, 0, 0, 2;
  2, 0, 0, 0, 0, 0, 6;
  4, 3, 0, 4, 0, 0, 0, 4;
  3, 0, 4, 0, 0, 0, 0, 0, 6;
  4, 2, 0, 0, 8, 0, 0, 0, 0, 4;
  ...
		

Crossrefs

Extensions

Edited by N. J. A. Sloane, Aug 11 2019
a(49) = 0 inserted and more terms from Georg Fischer, May 29 2023

A127474 Triangle, square of A054522.

Original entry on oeis.org

1, 2, 1, 3, 0, 4, 4, 3, 0, 4, 5, 0, 0, 0, 16, 6, 3, 8, 0, 0, 4, 7, 0, 0, 0, 0, 0, 36, 8, 7, 0, 12, 0, 0, 0, 16, 9, 0, 16, 0, 0, 0, 0, 0, 36, 10, 5, 0, 0, 32, 0, 0, 0, 0, 16
Offset: 1

Views

Author

Gary W. Adamson, Jan 15 2007

Keywords

Comments

Right border = A127473, squares of phi(n) terms. Row sums = A057660: (1, 3, 7, 11, 21, ...).

Examples

			First few rows of the triangle:
  1;
  2, 1;
  3, 0, 4;
  4, 3, 0,  4;
  5, 0, 0,  0, 16;
  6, 3, 8,  0,  0, 4;
  7, 0, 0,  0,  0, 0, 36;
  8, 7, 0, 12,  0, 0,  0, 16;
  ...
		

Crossrefs

Formula

(A054522)^2 as an infinite lower triangular matrix.

A127479 Triangle read by rows: A054522 * A054521 as infinite lower triangular matrices.

Original entry on oeis.org

1, 2, 0, 3, 2, 0, 4, 0, 2, 0, 5, 4, 4, 4, 0, 6, 2, 0, 0, 2, 0, 7, 6, 6, 6, 6, 6, 0, 8, 0, 6, 0, 4, 0, 4, 0, 9, 8, 0, 6, 6, 0, 6, 6, 0, 10, 4, 8, 4, 0, 0, 4, 0, 4, 0
Offset: 1

Views

Author

Gary W. Adamson, Jan 15 2007

Keywords

Comments

Row sums = A029939: (1, 2, 5, 6, 17, 10, 37, ...).

Examples

			First few rows of the triangle:
  1;
  2, 0;
  3, 2, 0;
  4, 0, 2, 0;
  5, 4, 4, 4, 0;
  6, 2, 0, 0, 2, 0;
  7, 6, 6, 6, 6, 6, 0;
  8, 0, 6, 0, 4, 0, 4, 0;
  ...
		

Crossrefs

Extensions

Edited by N. J. A. Sloane, Aug 10 2019

A057660 a(n) = Sum_{k=1..n} n/gcd(n,k).

Original entry on oeis.org

1, 3, 7, 11, 21, 21, 43, 43, 61, 63, 111, 77, 157, 129, 147, 171, 273, 183, 343, 231, 301, 333, 507, 301, 521, 471, 547, 473, 813, 441, 931, 683, 777, 819, 903, 671, 1333, 1029, 1099, 903, 1641, 903, 1807, 1221, 1281, 1521, 2163, 1197, 2101, 1563, 1911, 1727
Offset: 1

Views

Author

Henry Gould, Oct 15 2000

Keywords

Comments

Also sum of the orders of the elements in a cyclic group with n elements, i.e., row sums of A054531. - Avi Peretz (njk(AT)netvision.net.il), Mar 31 2001
Also inverse Moebius transform of EulerPhi(n^2), A002618.
Sequence is multiplicative with a(p^e) = (p^(2*e+1)+1)/(p+1). Example: a(10) = a(2)*a(5) = 3*21 = 63.
a(n) is the number of pairs (a, b) such that the equation ax = b is solvable in the ring (Zn, +, x). See the Mathematical Reflections link. - Michel Marcus, Jan 07 2017
From Jake Duzyk, Jun 06 2023: (Start)
These are the "contraharmonic means" of the improper divisors of square integers (inclusive of 1 and the square integer itself).
Permitting "Contraharmonic Divisor Numbers" to be defined analogously to Øystein Ore's Harmonic Divisor Numbers, the only numbers for which there exists an integer contraharmonic mean of the divisors are the square numbers, and a(n) is the n-th integer contraharmonic mean, expressible also as the sum of squares of divisors of n^2 divided by the sum of divisors of n^2. That is, a(n) = sigma_2(n^2)/sigma(n^2).
(a(n) = A001157(k)/A000203(k) where k is the n-th number such that A001157(k)/A000203(k) is an integer, i.e., k = n^2.)
This sequence is an analog of A001600 (Harmonic means of divisors of harmonic numbers) and A102187 (Arithmetic means of divisors of arithmetic numbers). (End)

References

  • David M. Burton, Elementary Number Theory, Allyn and Bacon Inc., Boston MA, 1976, p. 152.
  • H. W. Gould and Temba Shonhiwa, Functions of GCD's and LCM's, Indian J. Math. (Allahabad), Vol. 39, No. 1 (1997), pp. 11-35.
  • H. W. Gould and Temba Shonhiwa, A generalization of Cesaro's function and other results, Indian J. Math. (Allahabad), Vol. 39, No. 2 (1997), pp. 183-194.

Crossrefs

Programs

  • Haskell
    a057660 n = sum $ map (div n) $ a050873_row n
    -- Reinhard Zumkeller, Nov 25 2013
    
  • Mathematica
    Table[ DivisorSigma[ 2, n^2 ] / DivisorSigma[ 1, n^2 ], {n, 1, 128} ]
    Table[Total[Denominator[Range[n]/n]], {n, 55}] (* Alonso del Arte, Oct 07 2011 *)
    f[p_, e_] := (p^(2*e + 1) + 1)/(p + 1); a[n_] := Times @@ (f @@@ FactorInteger[n]); Array[a, 100] (* Amiram Eldar, Nov 21 2020 *)
  • PARI
    a(n)=if(n<1,0,sumdiv(n,d,d*eulerphi(d)))
    
  • PARI
    a(n)=sumdivmult(n,d, eulerphi(d)*d) \\ Charles R Greathouse IV, Sep 09 2014
    
  • Python
    from math import gcd
    def A057660(n): return sum(n//gcd(n,k) for k in range(1,n+1)) # Chai Wah Wu, Aug 24 2023
    
  • Python
    from math import prod
    from sympy import factorint
    def A057660(n): return prod((p**((e<<1)+1)+1)//(p+1) for p,e in factorint(n).items()) # Chai Wah Wu, Aug 05 2024

Formula

a(n) = Sum_{d|n} d*A000010(d) = Sum_{d|n} d*A054522(n,d), sum of d times phi(d) for all divisors d of n, where phi is Euler's phi function.
a(n) = sigma_2(n^2)/sigma_1(n^2) = A001157(A000290(n))/A000203(A000290(n)) = A001157(A000290(n))/A065764(n). - Labos Elemer, Nov 21 2001
a(n) = Sum_{d|n} A000010(d^2). - Enrique Pérez Herrero, Jul 12 2010
a(n) <= (n-1)*n + 1, with equality if and only if n is noncomposite. - Daniel Forgues, Apr 30 2013
G.f.: Sum_{n >= 1} n*phi(n)*x^n/(1 - x^n) = x + 3*x^2 + 7*x^3 + 11*x^4 + .... Dirichlet g.f.: sum {n >= 1} a(n)/n^s = zeta(s)*zeta(s-2)/zeta(s-1) for Re s > 3. Cf. A078747 and A176797. - Peter Bala, Dec 30 2013
a(n) = Sum_{i=1..n} numerator(n/i). - Wesley Ivan Hurt, Feb 26 2017
L.g.f.: -log(Product_{k>=1} (1 - x^k)^phi(k)) = Sum_{n>=1} a(n)*x^n/n. - Ilya Gutkovskiy, May 21 2018
From Richard L. Ollerton, May 10 2021: (Start)
a(n) = Sum_{k=1..n} lcm(n,k)/k.
a(n) = Sum_{k=1..n} gcd(n,k)*phi(gcd(n,k))/phi(n/gcd(n,k)). (End)
From Vaclav Kotesovec, Jun 13 2021: (Start)
Sum_{k=1..n} a(k)/k ~ 3*zeta(3)*n^2/Pi^2.
Sum_{k=1..n} k^2/a(k) ~ A345294 * n.
Sum_{k=1..n} k*A000010(k)/a(k) ~ A345295 * n. (End)
Sum_{k=1..n} a(k) ~ 2*zeta(3)*n^3/Pi^2. - Vaclav Kotesovec, Jun 10 2023

Extensions

More terms from James Sellers, Oct 16 2000

A003989 Triangle T from the array A(x, y) = gcd(x,y), for x >= 1, y >= 1, read by antidiagonals.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 3, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 4, 1, 2, 1, 1, 1, 3, 1, 1, 3, 1, 1, 1, 2, 1, 2, 5, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 4, 1, 6, 1, 4, 3, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 7, 2, 1, 2, 1, 2, 1, 1, 1, 3, 1, 5, 3, 1, 1, 3, 5, 1, 3, 1, 1, 1, 2, 1
Offset: 1

Views

Author

Keywords

Comments

For m < n, the maximal number of nonattacking queens that can be placed on the n by m rectangular toroidal chessboard is gcd(m,n), except in the case m=3, n=6.
The determinant of the matrix of the first n rows and columns is A001088(n). [Smith, Mansion] - Michael Somos, Jun 25 2012
Imagine a torus having regular polygonal cross-section of m sides. Now, break the torus and twist the free ends, preserving rotational symmetry, then reattach the ends. Let n be the number of faces passed in twisting the torus before reattaching it. For example, if n = m, then the torus has exactly one full twist. Do this for arbitrary m and n (m > 1, n > 0). Now, count the independent, closed paths on the surface of the resulting torus, where a path is "closed" if and only if it returns to its starting point after a finite number of times around the surface of the torus. Conjecture: this number is always gcd(m,n). NOTE: This figure constitutes a group with m and n the binary arguments and gcd(m,n) the resulting value. Twisting in the reverse direction is the inverse operation, and breaking & reattaching in place is the identity operation. - Jason Richardson-White, May 06 2013
Regarded as a triangle, table of gcd(n - k +1, k) for 1 <= k <= n. - Franklin T. Adams-Watters, Oct 09 2014
The n-th row of the triangle is 1,...,1, if and only if, n + 1 is prime. - Alexandra Hercilia Pereira Silva, Oct 03 2020

Examples

			The array A begins:
  [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
  [1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2]
  [1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1]
  [1, 2, 1, 4, 1, 2, 1, 4, 1, 2, 1, 4, 1, 2, 1, 4]
  [1, 1, 1, 1, 5, 1, 1, 1, 1, 5, 1, 1, 1, 1, 5, 1]
  [1, 2, 3, 2, 1, 6, 1, 2, 3, 2, 1, 6, 1, 2, 3, 2]
  [1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 7, 1, 1]
  [1, 2, 1, 4, 1, 2, 1, 8, 1, 2, 1, 4, 1, 2, 1, 8]
  [1, 1, 3, 1, 1, 3, 1, 1, 9, 1, 1, 3, 1, 1, 3, 1]
  [1, 2, 1, 2, 5, 2, 1, 2, 1, 10, 1, 2, 1, 2, 5, 2]
  [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 11, 1, 1, 1, 1, 1]
  [1, 2, 3, 4, 1, 6, 1, 4, 3, 2, 1, 12, 1, 2, 3, 4]
  ...
The triangle T begins:
  n\k 1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 ...
  1:  1
  2:  1  1
  3:  1  2  1
  4:  1  1  1  1
  5:  1  2  3  2  1
  6:  1  1  1  1  1  1
  7:  1  2  1  4  1  2  1
  8:  1  1  3  1  1  3  1  1
  9:  1  2  1  2  5  2  1  2  1
 10:  1  1  1  1  1  1  1  1  1  1
 11:  1  2  3  4  1  6  1  4  3  2  1
 12:  1  1  1  1  1  1  1  1  1  1  1  1
 13:  1  2  1  2  1  2  7  2  1  2  1  2  1
 14:  1  1  3  1  5  3  1  1  3  5  1  3  1  1
 15:  1  2  1  4  1  2  1  8  1  2  1  4  1  2  1
 ...  - _Wolfdieter Lang_, May 12 2018
		

References

  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics, Addison-Wesley, 2nd ed., 1994, ch. 4.
  • D. E. Knuth, The Art of Computer Programming, Addison-Wesley, section 4.5.2.

Crossrefs

Rows, columns and diagonals: A089128, A109007, A109008, A109009, A109010, A109011, A109012, A109013, A109014, A109015.
A109004 is (0, 0) based.
Cf. also A091255 for GF(2)[X] polynomial analog.
A(x, y) = A075174(A004198(A075173(x), A075173(y))) = A075176(A004198(A075175(x), A075175(y))).
Antidiagonal sums are in A006579.

Programs

  • GAP
    Flat(List([1..15],n->List([1..n],k->Gcd(n-k+1,k)))); # Muniru A Asiru, Aug 26 2018
  • Maple
    a:=(n,k)->gcd(n-k+1,k): seq(seq(a(n,k),k=1..n),n=1..15); # Muniru A Asiru, Aug 26 2018
  • Mathematica
    Table[ GCD[x - y + 1, y], {x, 1, 15}, {y, 1, x}] // Flatten (* Jean-François Alcover, Dec 12 2012 *)
  • PARI
    {A(n, m) = gcd(n, m)}; /* Michael Somos, Jun 25 2012 */
    

Formula

Multiplicative in both parameters with a(p^e, m) = gcd(p^e, m). - David W. Wilson, Jun 12 2005
T(n, k) = A(n - k + 1, k) = gcd(n - k + 1, k), n >= 1, k = 1..n. See a comment above and the Mathematica program. - Wolfdieter Lang, May 12 2018
Dirichlet generating function: Sum_{n>=1} Sum_{k>=1} gcd(n, k)/n^s/k^c = zeta(s)*zeta(c)*zeta(s + c - 1)/zeta(s + c). - Mats Granvik, Feb 13 2021
The LU decomposition of this square array = A051731 * transpose(A054522) (see Johnson (2003) or Chamberland (2013), p. 1673). - Peter Bala, Oct 15 2023
Showing 1-10 of 24 results. Next