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 31 results. Next

A374797 Distinct value of A003990 (LCM table read by antidiagonals) in order of appearance.

Original entry on oeis.org

1, 2, 3, 4, 6, 5, 10, 12, 7, 15, 8, 14, 20, 9, 21, 18, 24, 28, 30, 11, 35, 22, 36, 40, 42, 13, 33, 45, 26, 44, 56, 39, 55, 63, 16, 52, 60, 66, 70, 72, 17, 65, 77, 34, 48, 78, 84, 88, 90, 19, 51, 91, 99, 38, 68, 80, 104, 110, 57, 85, 105, 117, 76, 102, 112, 120
Offset: 1

Views

Author

Rémy Sigrist, Jul 20 2024

Keywords

Comments

This sequence is a permutation of the positive integers with inverse A374798 and similar to A257471.

Examples

			The first terms of A003990 are: 1, 2, 2, 3, 2, 3, 4, 6, 6, 4, 5, 4, 3, 4, 5, 6, 10. Removing duplicates yields 1, 2, 3, 4, 6, 5, 10.
		

Crossrefs

Cf. A003990, A257471 (analog for multiplication table), A374798 (inverse).

Programs

  • PARI
    \\ See Links section.

A374801 Irregular table T(n, k), n > 0, k = 1..A048691(n), read by rows; the n-th row lists the numbers m such that A003990(m) = n.

Original entry on oeis.org

1, 2, 3, 5, 4, 6, 13, 7, 10, 12, 14, 25, 11, 15, 41, 8, 9, 16, 21, 23, 27, 31, 34, 61, 22, 28, 85, 29, 36, 38, 44, 59, 63, 113, 37, 45, 58, 64, 145, 17, 20, 46, 55, 57, 65, 96, 101, 181, 56, 66, 221, 18, 19, 40, 42, 67, 78, 80, 90, 94, 103, 109, 117, 142, 148, 265, 79, 91, 313
Offset: 1

Views

Author

Rémy Sigrist, Jul 20 2024

Keywords

Comments

A003990 corresponds to a square array, but we consider it here as a flat sequence (when its values are read according along its antidiagonals).
As a flat sequence this is a permutation of the positive integers with inverse A374802.

Examples

			Triangle T(n, k) begins:
  n   n-th row
  --  ----------------------------------------------------------------
   1  1
   2  2, 3, 5
   3  4, 6, 13
   4  7, 10, 12, 14, 25
   5  11, 15, 41
   6  8, 9, 16, 21, 23, 27, 31, 34, 61
   7  22, 28, 85
   8  29, 36, 38, 44, 59, 63, 113
   9  37, 45, 58, 64, 145
  10  17, 20, 46, 55, 57, 65, 96, 101, 181
  11  56, 66, 221
  12  18, 19, 40, 42, 67, 78, 80, 90, 94, 103, 109, 117, 142, 148, 265
  13  79, 91, 313
  14  30, 35, 92, 105, 107, 119, 197, 204, 365
		

Crossrefs

Cf. A003990, A048691, A374802 (inverse).

Programs

  • PARI
    \\ See Links section.

A003991 Multiplication table read by antidiagonals: T(i,j) = i*j, i>=1, j>=1.

Original entry on oeis.org

1, 2, 2, 3, 4, 3, 4, 6, 6, 4, 5, 8, 9, 8, 5, 6, 10, 12, 12, 10, 6, 7, 12, 15, 16, 15, 12, 7, 8, 14, 18, 20, 20, 18, 14, 8, 9, 16, 21, 24, 25, 24, 21, 16, 9, 10, 18, 24, 28, 30, 30, 28, 24, 18, 10, 11, 20, 27, 32, 35, 36, 35, 32, 27, 20, 11, 12, 22, 30, 36, 40, 42, 42, 40, 36, 30, 22, 12
Offset: 1

Views

Author

Keywords

Comments

Or, triangle X(n,m) = T(n-m+1,m) read by rows, in which row n gives the numbers n*1, (n-1)*2, (n-2)*3, ..., 2*(n-1), 1*n.
Radius of incircle of Pythagorean triangle with sides a=(n+1)^2-m^2, b=2*(n+1)*m and c=(n+1)^2+m^2. - Floor van Lamoen, Aug 16 2001
A permutation of A061017. - Matthew Vandermast, Feb 28 2003
In the proof of countability of rational numbers they are arranged in a square array. a(n) = p*q where p/q is the corresponding rational number as read from the array. - Amarnath Murthy, May 29 2003
Permanent of upper right n X n corner is A000442. - Marc LeBrun, Dec 11 2003
Row 12 gives total number of partridges, turtle doves, ... and drummers drumming that you have received at the end of the Twelve Days of Christmas song. - Alonso del Arte, Jun 17 2005
Consider a particle with spin S (a half-integer) and 2S+1 quantum states |m>, m = -S,-S+1,...,S-1,S. Then the matrix element = sqrt((S+m+1)(S-m)) of the spin-raising operator is the square-root of the triangular (tabl) element T(r,o) of this sequence in row r = 2S, and at offset o=2(S+m). T(r,o) is also the intensity || of the transition between the states |m> and |m+1>. For example, the five transitions between the 6 states of a spin S=5/2 particle have relative intensities 5,8,9,8,5. The total intensity of all spin 5/2 transitions (relative to spin 1/2) is 35, which is the tetrahedral number A000292(5). - Stanislav Sykora, May 26 2012
Sum_{k=0..2n-2} (-1)^k*a(A000124(2n-2)+k) = n. See A098359. - Charlie Marion, Apr 22 2013
T(n, k) is also the (k-1)-superdiagonal sum of an n X n Toeplitz matrix M(n) whose first row consists of successive positive integer numbers 1, ..., n. - Stefano Spezia, Jul 12 2019
From Eric Lengyel, Jun 28 2023: (Start)
X(n, m+1) is the number of degrees of freedom that an m-dimensional flat geometry (point, line, plane, etc.) has when embedded in an n-dimensional Euclidean space.
X(n+1, m+1) is the number of degrees of freedom that an m-ball has when embedded in an n-dimensional Euclidean space. (End)
T(n, k) is also the average number of steps it takes a person to fall off a board of length n+k, if the person starts a random walk at k. - Ruediger Jehn, May 12 2025

Examples

			The array T starts in row n=1 with columns m>=1 as:
   1   2   3   4   5   6   7   8   9  10  11  12  13  14  15
   2   4   6   8  10  12  14  16  18  20  22  24  26  28  30
   3   6   9  12  15  18  21  24  27  30  33  36  39  42  45
   4   8  12  16  20  24  28  32  36  40  44  48  52  56  60
   5  10  15  20  25  30  35  40  45  50  55  60  65  70  75
   6  12  18  24  30  36  42  48  54  60  66  72  78  84  90
   7  14  21  28  35  42  49  56  63  70  77  84  91  98 105
   8  16  24  32  40  48  56  64  72  80  88  96 104 112 120
   9  18  27  36  45  54  63  72  81  90  99 108 117 126 135
  10  20  30  40  50  60  70  80  90 100 110 120 130 140 150
The triangle X(n, m) begins
   n\m  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 ...
   1:   1
   2:   2  2
   3:   3  4  3
   4:   4  6  6  4
   5:   5  8  9  8  5
   6:   6 10 12 12 10  6
   7:   7 12 15 16 15 12  7
   8:   8 14 18 20 20 18 14  8
   9:   9 16 21 24 25 24 21 16  9
  10:  10 18 24 28 30 30 28 24 18 10
  11:  11 20 27 32 35 36 35 32 27 20 11
  12:  12 22 30 36 40 42 42 40 36 30 22 12
  13:  13 24 33 40 45 48 49 48 45 40 33 24 13
  14:  14 26 36 44 50 54 56 56 54 50 44 36 26 14
  15:  15 28 39 48 55 60 63 64 63 60 55 48 39 28 15
  ... Formatted by _Wolfdieter Lang_, Dec 02 2014
		

References

  • J. H. Conway and R. K. Guy, The Book of Numbers, Copernicus Press, NY, 1996, p. 46.
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, pages 5-6.

Crossrefs

Main diagonal gives squares A000290. Antidiagonal sums are tetrahedral numbers A000292. See A004247 for another version.

Programs

  • Magma
    /* As triangle */ [[k*(n-k+1): k in [1..n]]: n in [1..15]]; // Vincenzo Librandi, Jul 12 2019
  • Maple
    seq(seq(i*(n-i),i=1..n-1),n=2..10); # Robert Israel, Dec 14 2015
  • Mathematica
    Table[(x + 1 - y) y, {x, 13}, {y, x}] // Flatten (* Robert G. Wilson v, Oct 06 2007 *)
    f[n_] := Table[SeriesCoefficient[E^(x + y) (1+ x - y +x*y-y^2), {x, 0, i}, {y, 0, j}]*i!*j!, {i, n, n}, {j, 0, n}]; Flatten[Array[f, 11,0]] (* Stefano Spezia, Jul 12 2019 *)
  • PARI
    A003991(n,k) = if(k<1 || n<1,0,k*n)
    

Formula

Rectangular array: T(n, m) = n*m, n>=1, m>= 1.
Triangle X(n, m) = T(n-m+1, m) = (n-m+1)*m.
Sum_{i=1..n} Sum_{j=1..n} a(n) = A000537(n) [Sum of first n cubes; or n-th triangular number squared.] Determinant of all n X n contiguous subarrays of A003991 is 0. - Gerald McGarvey, Sep 26 2004
G.f. as rectangular array: x*y/((1 - x)^2*(1 - y)^2).
a(n) = i*j, where i=floor((1+sqrt(8n-7))/2), j=n-i*(i-1)/2. - Hieronymus Fischer, Aug 08 2007
As an infinite lower triangular matrix equals A000012 * A002260; where A000012 = (1; 1,1; 1,1,1; ...) and A002260 = (1; 1,2; 1,2,3; ...). - Gary W. Adamson, Oct 23 2007
As a linear array, the sequence is a(n) = A002260(n)*A004736(n) or a(n) = ((t*t+3*t+4)/2-n)*(n-(t*(t+1)/2)), where t=floor((-1+sqrt(8*n-7))/2). - Boris Putievskiy, Dec 17 2012
G.f. as linear array: (x - 3*x^2 + Sum_{k >= 0} ((k+2-x-(k+1)*x^2)*x^((k^2+3*k+4)/2)))/(1-x)^3. - Robert Israel, Dec 14 2015
E.g.f. as triangle: exp(x+y)*(1 + x - y + x*y - y^2). - Stefano Spezia, Jul 12 2019
a(n) = (1/2)*t + (n - 1/4)*t^2 - (1/4)*t^4 - n^2 + n, where t = floor(sqrt(2*n) + 1/2). - Ridouane Oudra, Nov 21 2020
a(n) = A003989(n) * A003990(n) = A059895(n) * A059896(n) = A059895(n)^2 * A059897(n). - Antti Karttunen, Dec 13 2021
T(n,k) = A002620(n+k) - A002620(n-k). - Michel Marcus, Jan 06 2023
T(n,k) = number of sums |x-y|+|y-z| = k, where x,y,z are in {1,2,...,n} and x < y < z. - Clark Kimberling, Jan 22 2024
E.g.f. as rectangular array: x*y*exp(x+y). - Stefano Spezia, Jun 27 2025

Extensions

More terms from Michael Somos

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

A059896 The set of Fermi-Dirac factors of A(n,k) is the union of the Fermi-Dirac factors of n and k. Symmetric square array read by antidiagonals.

Original entry on oeis.org

1, 2, 2, 3, 2, 3, 4, 6, 6, 4, 5, 8, 3, 8, 5, 6, 10, 12, 12, 10, 6, 7, 6, 15, 4, 15, 6, 7, 8, 14, 6, 20, 20, 6, 14, 8, 9, 8, 21, 24, 5, 24, 21, 8, 9, 10, 18, 24, 28, 30, 30, 28, 24, 18, 10, 11, 10, 27, 8, 35, 6, 35, 8, 27, 10, 11, 12, 22, 30, 36, 40, 42, 42, 40, 36, 30, 22, 12, 13, 24
Offset: 1

Views

Author

Marc LeBrun, Feb 06 2001

Keywords

Comments

Every positive integer, m, is the product of a unique subset, S(m), of the numbers listed in A050376 (primes, squares of primes etc.) The Fermi-Dirac factors of m are the members of S(m). So T(n,k) is the product of the members of (S(n) U S(k)).
Old name: Table a(i,j) = product prime(k)^(Ei(k) OR Ej(k)) where Ei and Ej are the vectors of exponents in the prime factorizations of i and j; OR is the bitwise operation on binary representation of the exponents.
Analogous to LCM, with OR replacing MAX.
A003418-analog seems to be A066616. - Antti Karttunen, Apr 12 2017
Considered as a binary operation, the result is the lowest common multiple of the squarefree parts of its operands multiplied by the square of the operation's result when applied to the square roots of the square parts of its operands. - Peter Munn, Mar 02 2022

Examples

			A(864,1944) = A(2^5*3^3,2^3*3^5) = 2^(5 OR 3) * 3^(3 OR 5) = 2^7*3^7 = 279936.
The top left 12 X 12 corner of the array:
   1,  2,  3,  4,  5,  6,  7,  8,   9,  10,  11,  12
   2,  2,  6,  8, 10,  6, 14,  8,  18,  10,  22,  24
   3,  6,  3, 12, 15,  6, 21, 24,  27,  30,  33,  12
   4,  8, 12,  4, 20, 24, 28,  8,  36,  40,  44,  12
   5, 10, 15, 20,  5, 30, 35, 40,  45,  10,  55,  60
   6,  6,  6, 24, 30,  6, 42, 24,  54,  30,  66,  24
   7, 14, 21, 28, 35, 42,  7, 56,  63,  70,  77,  84
   8,  8, 24,  8, 40, 24, 56,  8,  72,  40,  88,  24
   9, 18, 27, 36, 45, 54, 63, 72,   9,  90,  99, 108
  10, 10, 30, 40, 10, 30, 70, 40,  90,  10, 110, 120
  11, 22, 33, 44, 55, 66, 77, 88,  99, 110,  11, 132
  12, 24, 12, 12, 60, 24, 84, 24, 108, 120, 132,  12
		

Crossrefs

Sequences used in a definition of this sequence: A003986, A000188/A007913/A008833, A052330/A052331.
Has simple/very significant relationships with A003961, A059895/A059897, A225546, A267116.

Programs

Formula

From Antti Karttunen, Apr 11 2017: (Start)
A(x,y) = A059895(x,y) * A059897(x,y).
A(x,y) * A059895(x,y) = x*y.
(End).
From Peter Munn, Mar 02 2022: (Start)
OR denotes the bitwise operation (A003986).
Limited multiplicative property: if gcd(n_1*k_1, n_2*k_2) = 1 then A(n_1*n_2, k_1*k_2) = A(n_1, k_1) * A(n_2, k_2).
For prime p, A(p^e_1, p^e_2) = p^(e_1 OR e_2).
A(n, A(m, k)) = A(A(n, m), k).
A(n, k) = A(k, n).
A(n, 1) = A(n, n) = n.
A(n^2, k^2) = A(n, k)^2.
A(n, k) = A(A007913(n), A007913(k)) * A(A008833(n), A008833(k)) = lcm(A007913(n), A007913(k)) * A(A000188(n), A000188(k))^2.
A007947(A(n, k)) = A007947(n*k).
Isomorphism: A(A052330(n), A052330(k)) = A052330(n OR k).
Equivalently, A(n, k) = A052330(A052331(n) OR A052331(k)).
A(A003961(n), A003961(k)) = A003961(A(n, k)).
A(A225546(n), A225546(k)) = A225546(A(n, k)).
(End)

Extensions

New name from Peter Munn, Mar 02 2022

A049581 Table T(n,k) = |n-k| read by antidiagonals (n >= 0, k >= 0).

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Commutative non-associative operator with identity 0. T(nx,kx) = x T(n,k). A multiplicative analog is A089913. - Marc LeBrun, Nov 14 2003
For the characteristic polynomial of the n X n matrix M_n with entries M_n(i, j) = |i-j| see A203993. - Wolfdieter Lang, Feb 04 2018
For the determinant of the n X n matrix M_n with entries M_n(i, j) = |i-j| see A085750. - Bernard Schott, May 13 2020
a(n) = 0 iff n = 4 times triangular number (A046092). - Bernard Schott, May 13 2020

Examples

			Displayed as a triangle t(n, k):
  n\k   0 1 2 3 4 5 6 7 8 9 10 ...
  0:    0
  1:    1 1
  2:    2 0 2
  3:    3 1 1 3
  4:    4 2 0 2 4
  5:    5 3 1 1 3 5
  6:    6 4 2 0 2 4 6
  7:    7 5 3 1 1 3 5 7
  8:    8 6 4 2 0 2 4 6 8
  9:    9 7 5 3 1 1 3 5 7 9
  10:  10 8 6 4 2 0 2 4 6 8 10
... reformatted by _Wolfdieter Lang_, Feb 04 2018
Displayed as a table:
  0 1 2 3 4 5 6 ...
  1 0 1 2 3 4 5 ...
  2 1 0 1 2 3 4 ...
  3 2 1 0 1 2 3 ...
  4 3 2 1 0 1 2 ...
  5 4 3 2 1 0 1 ...
  6 5 4 3 2 1 0 ...
  ...
		

Crossrefs

Cf. A089913. Apart from signs, same as A114327. A203993.

Programs

  • GAP
    a := Flat(List([0..12],n->List([0..n],k->Maximum(k,n-k)-Minimum(k,n-k)))); # Muniru A Asiru, Jan 26 2018
    
  • Magma
    [[Abs(n-2*k): k in [0..n]]: n in [0..12]]; // G. C. Greubel, Jun 07 2019
    
  • Maple
    seq(seq(abs(n-2*k),k=0..n),n=0..12); # Robert Israel, Sep 30 2015
  • Mathematica
    Table[Abs[(n-k) -k], {n,0,12}, {k,0,n}]//Flatten (* Michael De Vlieger, Sep 29 2015 *)
    Table[Join[Range[n,0,-2],Range[If[EvenQ[n],2,1],n,2]],{n,0,12}]//Flatten (* Harvey P. Dale, Sep 18 2023 *)
  • PARI
    a(n) = abs(2*(n+1)-binomial((sqrtint(8*(n+1))+1)\2, 2)-(binomial(1+floor(1/2 + sqrt(2*(n+1))), 2))-1);
    vector(100, n , a(n-1)) \\ Altug Alkan, Sep 29 2015
    
  • PARI
    {t(n,k) = abs(n-2*k)}; \\ G. C. Greubel, Jun 07 2019
    
  • Python
    from math import isqrt
    def A049581(n): return abs((k:=n+1<<1)-((m:=isqrt(k))+(k>m*(m+1)))**2-1) # Chai Wah Wu, Nov 09 2024
  • Sage
    [[abs(n-2*k) for k in (0..n)] for n in (0..12)] # G. C. Greubel, Jun 07 2019
    

Formula

G.f.: (x + y - 4*x*y + x^2*y + x*y^2)/((1-x)^2*(1-y)^2*(1-x*y)) = (x/(1-x)^2 + y/(1-y)^2)/(1-x*y). T(n,0) = T(0,n) = n; T(n+1,k+1) = T(n,k). - Franklin T. Adams-Watters, Feb 06 2006
a(n) = |A002260(n+1)-A004736(n+1)| or a(n) = |((n+1)-t*(t+1)/2) - ((t*t+3*t+4)/2-(n+1))| where t = floor((-1+sqrt(8*(n+1)-7))/2). - Boris Putievskiy, Dec 24 2012; corrected by Altug Alkan, Sep 30 2015
From Robert Israel, Sep 30 2015: (Start)
If b(n) = a(n+1) - 2*a(n) + a(n-1), then for n >= 3 we have
b(n) = -1 if n = (j^2+5j+4)/2 for some integer j >= 1
b(n) = -3 if n = (j^2+5j+6)/2 for some integer j >= 0
b(n) = 4 if n = 2j^2 + 6j + 4 for some integer j >= 0
b(n) = 2 if n = 2j^2 + 8j + 7 or 2j^2 + 8j + 8 for some integer j >= 0
b(n) = 0 otherwise. (End)
Triangle t(n,k) = max(k, n-k) - min(k, n-k). - Peter Luschny, Jan 26 2018
Triangle t(n, k) = |n - 2*k| for n >= 0, k = 0..n. See the Maple and Mathematica programs. Hence t(n, k)= t(n, n-k). - Wolfdieter Lang, Feb 04 2018
a(n) = |t^2 - 2*n - 1|, where t = floor(sqrt(2*n+1) + 1/2). - Ridouane Oudra, Jun 07 2019; Dec 11 2020
As a rectangle, T(n,k) = |n-k| = max(n,k) - min(n,k). - Clark Kimberling, May 11 2020

A051173 Triangle read by rows: T(n, k) = lcm(n, k).

Original entry on oeis.org

1, 2, 2, 3, 6, 3, 4, 4, 12, 4, 5, 10, 15, 20, 5, 6, 6, 6, 12, 30, 6, 7, 14, 21, 28, 35, 42, 7, 8, 8, 24, 8, 40, 24, 56, 8, 9, 18, 9, 36, 45, 18, 63, 72, 9, 10, 10, 30, 20, 10, 30, 70, 40, 90, 10, 11, 22, 33, 44, 55, 66, 77, 88, 99, 110, 11, 12, 12, 12, 12, 60, 12, 84, 24, 36, 60, 132, 12
Offset: 1

Views

Author

Keywords

Examples

			Triangle begins (for the full array see A109042):
  [1]  1;
  [2]  2,  2;
  [3]  3,  6,  3;
  [4]  4,  4, 12,  4;
  [5]  5, 10, 15, 20,  5;
  [6]  6,  6,  6, 12, 30,  6;
  [7]  7, 14, 21, 28, 35, 42,  7;
  [8]  8,  8, 24,  8, 40, 24, 56,  8;
		

Crossrefs

Cf. A109043 (column 2), A051193 (row sums), A000384 (central terms).

Programs

  • Haskell
    a051173 = lcm
    a051173_row n = a051173_tabl !! (n-1)
    a051173_tabl = map (\x -> map (lcm x) [1..x]) [1..]
    -- Reinhard Zumkeller, Aug 13 2013, Jul 07 2013
    
  • Maple
    A051173 := proc(u,v) ilcm(u,v) ; end proc: # R. J. Mathar, Apr 07 2011
  • Mathematica
    Table[LCM[n, k], {n, 1, 12}, {k, 1, n}] // Flatten (* Jean-François Alcover, Jan 30 2018 *)
  • PARI
    T(n,k) = lcm(n,k);
    tabl(nn) = for (n=1, nn, for (k=1, n, print1(T(n,k), ", ")); print;) \\ Michel Marcus, Jul 10 2017

Formula

T(n, 1) = T(n, n) = n. T(n, 2) = A109043(n). - R. J. Mathar, Apr 07 2011
T(n, k) = A075362(n, k)/A050873(n, k), 1 <= k <= n. - Reinhard Zumkeller, Apr 25 2011
T(n, k) = A051537(n, k) * A050873(n, k). - Reinhard Zumkeller, Jul 07 2013

A109042 Square array read by antidiagonals: A(n, k) = lcm(n, k) for n >= 0, k >= 0.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 0, 2, 2, 0, 0, 3, 2, 3, 0, 0, 4, 6, 6, 4, 0, 0, 5, 4, 3, 4, 5, 0, 0, 6, 10, 12, 12, 10, 6, 0, 0, 7, 6, 15, 4, 15, 6, 7, 0, 0, 8, 14, 6, 20, 20, 6, 14, 8, 0, 0, 9, 8, 21, 12, 5, 12, 21, 8, 9, 0, 0, 10, 18, 24, 28, 30, 30, 28, 24, 18, 10, 0, 0, 11, 10, 9, 8, 35, 6, 35, 8, 9, 10, 11, 0
Offset: 0

Views

Author

Mitch Harris, Jun 18 2005

Keywords

Examples

			Seen as an array:
  [0] 0, 0,  0,  0,  0,  0,  0,  0,  0,  0, ...
  [1] 0, 1,  2,  3,  4,  5,  6,  7,  8,  9, ...
  [2] 0, 2,  2,  6,  4, 10,  6, 14,  8, 18, ...
  [3] 0, 3,  6,  3, 12, 15,  6, 21, 24,  9, ...
  [4] 0, 4,  4, 12,  4, 20, 12, 28,  8, 36, ...
  [5] 0, 5, 10, 15, 20,  5, 30, 35, 40, 45, ...
  [6] 0, 6,  6,  6, 12, 30,  6, 42, 24, 18, ...
  [7] 0, 7, 14, 21, 28, 35, 42,  7, 56, 63, ...
  [8] 0, 8,  8, 24,  8, 40, 24, 56,  8, 72, ...
  [9] 0, 9, 18,  9, 36, 45, 18, 63, 72,  9, ...
.
Seen as a triangle T(n, k) = lcm(n - k, k).
  [0] 0;
  [1] 0, 0;
  [2] 0, 1,  0;
  [3] 0, 2,  2,  0;
  [4] 0, 3,  2,  3,  0;
  [5] 0, 4,  6,  6,  4,  0;
  [6] 0, 5,  4,  3,  4,  5, 0;
  [7] 0, 6, 10, 12, 12, 10, 6,  0;
  [8] 0, 7,  6, 15,  4, 15, 6,  7, 0;
  [9] 0, 8, 14,  6, 20, 20, 6, 14, 8, 0;
		

Crossrefs

Rows A000027, A109043, A109044, A109045, A109046, A109047, A109048, A109049, A109050, A109051, A109052, A109053, A006580 (row sums of triangle), A001477 (main diagonal, central terms).
Variants: A003990 is (1, 1) based, A051173 (T(n,k) = lcm(n,k)).

Programs

  • Maple
    T := (n, k) -> ilcm(n - k, k):
    for n from 0 to 9 do seq(T(n, k), k = 0..n) od;  # Peter Luschny, Mar 24 2025

Formula

lcm(n, k) = n*k / gcd(n, k) for (n, k) != (0, 0).

A080398 Largest squarefree number dividing sum of divisors of n.

Original entry on oeis.org

1, 3, 2, 7, 6, 6, 2, 15, 13, 6, 6, 14, 14, 6, 6, 31, 6, 39, 10, 42, 2, 6, 6, 30, 31, 42, 10, 14, 30, 6, 2, 21, 6, 6, 6, 91, 38, 30, 14, 30, 42, 6, 22, 42, 78, 6, 6, 62, 57, 93, 6, 14, 6, 30, 6, 30, 10, 30, 30, 42, 62, 6, 26, 127, 42, 6, 34, 42, 6, 6, 6, 195, 74, 114, 62, 70, 6, 42, 10
Offset: 1

Views

Author

Labos Elemer, Mar 19 2003

Keywords

Comments

Not multiplicative, but satisfies a similar condition: For all coprime x, y (with gcd(x,y)=1), a(x*y) = LCM(a(x), a(y)), where LCM is the least common multiply of its arguments, A003990. Compare also with A351560. - Antti Karttunen, Feb 20 2022

Examples

			n=12:sigma[12]=1+2+3+4+6+12=28, sqf-kernel=14=a(12)
		

Crossrefs

Programs

  • Mathematica
    ffi[x_] := Flatten[FactorInteger[x]] lf[x_] := Length[FactorInteger[x]] ba[x_] := Table[Part[ffi[x], 2*w-1], {w, 1, lf[x]}] cor[x_] := Apply[Times, ba[x]] Table[cor[DivisorSigma[1, w]], {w, 1, 100}]
  • PARI
    a(n) = factorback(factor(sigma(n))[,1]); \\ Michel Marcus, Nov 18 2017

Formula

a(n) = A007947(A000203(n)).
a(n) = A019565(A351560(n)). - Antti Karttunen, Feb 20 2022

A075173 Prime factorization of n encoded by interleaving successive prime exponents in unary to bit-positions given by columns of A075300.

Original entry on oeis.org

0, 1, 2, 5, 8, 3, 128, 21, 34, 9, 32768, 7, 2147483648, 129, 10, 85, 9223372036854775808, 35, 170141183460469231731687303715884105728, 13, 130, 32769
Offset: 1

Views

Author

Antti Karttunen, Sep 13 2002

Keywords

Comments

As in A059884, here also we store the exponent e_i of p_i (p1=2, p2=3, p3=5, ...) in the factorization of n to the bit positions given by the column i-1 of A075300 (the exponent of 2 is thus stored to bit positions 0, 2, 4, ..., exponent of 3 to 1, 5, 9, 13, ..., exponent of 5 to 3, 11, 19, 27, 35, ...), but using unary instead of binary system, i.e. we actually store 2^(e_i) - 1 in binary.
This injective mapping from N to N offers an example of the proof given in Cameron's book that any distributive lattice can be represented as a sublattice of the power-set lattice P(X) of some set X. This allows us to implement GCD (A003989) with bitwise AND (A004198) and LCM (A003990) with bitwise OR (A003986). Also, to test whether x divides y, it is enough to check that ((a(x) OR a(y)) XOR a(y)) = A003987(A003986(a(x),a(y)),a(y)) is zero.

Examples

			a(24) = 23 because 24 = 2^3 * 3^1 so we add the binary words 10101 and 10 to get 10111 in binary = 23 in decimal and a(25) = 2056 because 25 = 5^2 so we form a binary word 100000001000 = 2056 in decimal.
		

References

  • P. J. Cameron, Combinatorics: Topics, Techniques, Algorithms, Cambridge University Press, 1998, page 191. (12.3. Distributive lattices)

Crossrefs

Variant: A075175. Inverse: A075174. Cf. A059884.
A003989(x, y) = A075174(A004198(a(x), a(y))), A003990(x, y) = A075174(A003986(a(x), a(y))).
Showing 1-10 of 31 results. Next