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.

Previous Showing 11-20 of 52 results. Next

A384047 Triangle read by rows: T(n, k) for 1 <= k <= n is the largest divisor of k that is a unitary divisor of n.

Original entry on oeis.org

1, 1, 2, 1, 1, 3, 1, 1, 1, 4, 1, 1, 1, 1, 5, 1, 2, 3, 2, 1, 6, 1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 1, 8, 1, 1, 1, 1, 1, 1, 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, 1, 3, 4, 1, 3, 1, 4, 3, 1, 1, 12, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 13
Offset: 1

Views

Author

Amiram Eldar, May 18 2025

Keywords

Examples

			Triangle begins:
  1
  1, 2
  1, 1, 3
  1, 1, 1, 4
  1, 1, 1, 1, 5
  1, 2, 3, 2, 1, 6
  1, 1, 1, 1, 1, 1, 7
  1, 1, 1, 1, 1, 1, 1, 8
  1, 1, 1, 1, 1, 1, 1, 1, 9
  1, 2, 1, 2, 5, 2, 1, 2, 1, 10
		

Crossrefs

Upper right triangle of A322482.

Programs

  • Mathematica
    udiv[n_] := Select[Divisors[n], CoprimeQ[#, n/#] &]; T[n_, k_] := Max[Intersection[udiv[n], Divisors[k]]]; Table[T[n, k], {n, 1, 10}, {k, 1, n}] // Flatten
  • PARI
    udiv(n) = select(x -> gcd(x, n/x) == 1, divisors(n));
    T(n, k) = vecmax(setintersect(udiv(n), divisors(k)));

Formula

T(n, 1) = 1.
T(n, n) = n.
T(n, k) <= A050873(n, k) = gcd(n, k), with equality if n is squarefree (A005117).

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

A345415 Table read by upward antidiagonals: Given m, n >= 1, write gcd(m,n) as d = u*m+v*n where u, v are minimal; T(m,n) = u.

Original entry on oeis.org

0, 0, 1, 0, 0, 1, 0, 1, -1, 1, 0, 0, 0, 1, 1, 0, 1, 1, -1, -2, 1, 0, 0, -1, 0, 2, 1, 1, 0, 1, 0, 1, -1, 1, -3, 1, 0, 0, 1, 1, 0, -1, -2, 1, 1, 0, 1, -1, -1, 1, -1, 2, 3, -4, 1, 0, 0, 0, 0, -2, 0, 3, 1, 1, 1, 1, 0, 1, 1, 1, 2, 1, -1, -3, -2, -3, -5, 1, 0, 0, -1, 1, -1, 1, 0, -1, 2, -2, 4, 1, 1
Offset: 1

Views

Author

N. J. A. Sloane, Jun 19 2021

Keywords

Comments

The gcd is given in A003989, and v is given in A345416. Minimal means minimize u^2+v^2. We follow Maple, PARI, etc., in setting u=0 and v=1 when m=n. If we ignore the diagonal, the v table is the transpose of the u table.

Examples

			The gcd table (A003989) 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 u table (this entry) begins:
[0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
[0, 0, -1, 1, -2, 1, -3, 1, -4, 1, -5, 1, -6, 1, -7, 1]
[0, 1, 0, -1, 2, 1, -2, 3, 1, -3, 4, 1, -4, 5, 1, -5]
[0, 0, 1, 0, -1, -1, 2, 1, -2, -2, 3, 1, -3, -3, 4, 1]
[0, 1, -1, 1, 0, -1, 3, -3, 2, 1, -2, 5, -5, 3, 1, -3]
[0, 0, 0, 1, 1, 0, -1, -1, -1, 2, 2, 1, -2, -2, -2, 3]
[0, 1, 1, -1, -2, 1, 0, -1, 4, 3, -3, -5, 2, 1, -2, 7]
[0, 0, -1, 0, 2, 1, 1, 0, -1, -1, -4, -1, 5, 2, 2, 1]
[0, 1, 0, 1, -1, 1, -3, 1, 0, -1, 5, -1, 3, -3, 2, -7]
[0, 0, 1, 1, 0, -1, -2, 1, 1, 0, -1, -1, 4, 3, -1, -3]
[0, 1, -1, -1, 1, -1, 2, 3, -4, 1, 0, -1, 6, -5, -4, 3]
[0, 0, 0, 0, -2, 0, 3, 1, 1, 1, 1, 0, -1, -1, -1, -1]
...
The v table (A345416) begins:
[1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
[1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0]
[1, -1, 1, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1]
[1, 1, -1, 1, 1, 1, -1, 0, 1, 1, -1, 0, 1, 1, -1, 0]
[1, -2, 2, -1, 1, 1, -2, 2, -1, 0, 1, -2, 2, -1, 0, 1]
[1, 1, 1, -1, -1, 1, 1, 1, 1, -1, -1, 0, 1, 1, 1, -1]
[1, -3, -2, 2, 3, -1, 1, 1, -3, -2, 2, 3, -1, 0, 1, -3]
[1, 1, 3, 1, -3, -1, -1, 1, 1, 1, 3, 1, -3, -1, -1, 0]
[1, -4, 1, -2, 2, -1, 4, -1, 1, 1, -4, 1, -2, 2, -1, 4]
[1, 1, -3, -2, 1, 2, 3, -1, -1, 1, 1, 1, -3, -2, 1, 2]
[1, -5, 4, 3, -2, 2, -3, -4, 5, -1, 1, 1, -5, 4, 3, -2]
[1, 1, 1, 1, 5, 1, -5, -1, -1, -1, -1, 1, 1, 1, 1, 1]
...
		

Crossrefs

Programs

  • Maple
    mygcd:=proc(a,b) local d,s,t; d := igcdex(a,b,`s`,`t`); [a,b,d,s,t]; end;
    gcd_rowu:=(m,M)->[seq(mygcd(m,n)[4],n=1..M)];
    for m from 1 to 12 do lprint(gcd_rowu(m,16)); od;
  • Mathematica
    T[m_, n_] := Module[{u, v}, MinimalBy[{u, v} /. Solve[u^2 + v^2 <= 26 && u*m + v*n == GCD[m, n], {u, v}, Integers], #.#&][[1, 1]]];
    Table[T[m - n + 1, n], {m, 1, 13}, {n, 1, m}] // Flatten (* Jean-François Alcover, Mar 27 2023 *)

A072030 Array read by antidiagonals: T(n,k) = number of steps in simple Euclidean algorithm for gcd(n,k) where n >= 1, k >= 1.

Original entry on oeis.org

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

Views

Author

Michael Somos, Jun 07 2002

Keywords

Comments

The old definition was: Triangle T(a,b) read by rows giving number of steps in simple Euclidean algorithm for gcd(a,b) (a > b >= 1). [For this, see A049834.]
For example <11,3> -> <8,3> -> <5,3> -> <3,2> -> <2,1> -> <1,1> -> <1,0> takes 6 steps.
The number of steps function can be defined inductively by T(a,b) = T(b,a), T(a,0) = 0, and T(a+b,b) = T(a,b)+1.
The simple Euclidean algorithm is the Euclidean algorithm without divisions. Given a pair of positive integers with a>=b, let = . This is iterated until a^(m)=0. Then T(a,b) is the number of steps m.
Note that row n starts at k = 1; the number of steps to compute gcd(n,0) or gcd(0,n) is not shown. - T. D. Noe, Oct 29 2007

Examples

			The array begins:
   1,  2,  3,  4,  5,  6,  7,  8,  9, 10, ...
   2,  1,  3,  2,  4,  3,  5,  4,  6,  5, ...
   3,  3,  1,  4,  4,  2,  5,  5,  3,  6, ...
   4,  2,  4,  1,  5,  3,  5,  2,  6,  4, ...
   5,  4,  4,  5,  1,  6,  5,  5,  6,  2, ...
   6,  3,  2,  3,  6,  1,  7,  4,  3,  4, ...
   7,  5,  5,  5,  5,  7,  1,  8,  6,  6, ...
   8,  4,  5,  2,  5,  4,  8,  1,  9,  5, ...
   9,  6,  3,  6,  6,  3,  6,  9,  1, 10, ...
  10,  5,  6,  4,  2,  4,  6,  5, 10,  1, ...
  ...
The first few antidiagonals are:
   1;
   2,  2;
   3,  1,  3;
   4,  3,  3,  4;
   5,  2,  1,  2,  5;
   6,  4,  4,  4,  4,  6;
   7,  3,  4,  1,  4,  3,  7;
   8,  5,  2,  5,  5,  2,  5,  8;
   9,  4,  5,  3,  1,  3,  5,  4,  9;
  10,  6,  5,  5,  6,  6,  5,  5,  6, 10;
  ...
		

Crossrefs

Antidiagonal sums are A072031.
Cf. A049834 (the lower left triangle), A003989, A050873.
See also A267177, A267178, A267181.

Programs

  • Maple
    A072030 := proc(n,k)
        option remember;
        if n < 1 or k < 1 then
            0;
        elif n = k then
            1 ;
        elif n < k then
            procname(k,n) ;
        else
            1+procname(k,n-k) ;
        end if;
    end proc:
    seq(seq(A072030(d-k,k),k=1..d-1),d=2..12) ; # R. J. Mathar, May 07 2016
    # second Maple program:
    A:= (n, k)-> add(i, i=convert(k/n, confrac)):
    seq(seq(A(n, 1+d-n), n=1..d), d=1..14);  # Alois P. Heinz, Jan 31 2023
  • Mathematica
    T[n_, k_] := T[n, k] = Which[n<1 || k<1, 0, n==k, 1, nJean-François Alcover, Nov 21 2016, adapted from PARI *)
  • PARI
    T(n, k) = if( n<1 || k<1, 0, if( n==k, 1, if( n
    				

Extensions

Definition and Comments revised by N. J. A. Sloane, Jan 14 2016

A075362 Triangle read by rows with the n-th row containing the first n multiples of n.

Original entry on oeis.org

1, 2, 4, 3, 6, 9, 4, 8, 12, 16, 5, 10, 15, 20, 25, 6, 12, 18, 24, 30, 36, 7, 14, 21, 28, 35, 42, 49, 8, 16, 24, 32, 40, 48, 56, 64, 9, 18, 27, 36, 45, 54, 63, 72, 81, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 11, 22, 33, 44, 55, 66, 77, 88, 99, 110, 121, 12, 24, 36, 48, 60, 72, 84
Offset: 1

Views

Author

Amarnath Murthy, Sep 20 2002

Keywords

Comments

(Conjecture) Let N=2*n and k=1,...,n. Let A_{N,0}, A_{N,1}, ..., A_{N,n-1} be the n X n unit-primitive matrices (see [Jeffery]) associated with N. Define the Chebyshev polynomials of the second kind by the recurrence U_0(x)=1, U_1(x)=2*x and U_r(x)=2*x*U_(r-1)(x)-U_(r-2)(x) (r>1). Define the column vectors V_(k-1)=(U_(k-1)(cos(Pi/N)), U_(k-1)(cos(3*Pi/N)), ..., U_(k-1)(cos((2*n-1)*Pi/N)))^T, where B^T denotes the transpose of matrix B. Let S_N=[V_0,V_1,...,V_(n-1)] be the n X n matrix formed by taking the components of vector V_(k-1) as the entries in column k-1 (V_(k-1) gives the ordered spectrum of A_{N,k-1}). Let X_N=[S_N]^T*S_N, and let [X_N](i,j) denote the entry in row i and column j of X_N, i,j in {0,...,n-1}. Then also T(n,k)=[X_N](k-1,k-1); that is, row n of the triangle is given by the main diagonal entries of X_N. Hence T(n,k) is the sum of squares T(n,k) = sum[m=1,...,n (U_(k-1)(cos((2*m-1)*Pi/N)))^2]=[V_(k-1)]^T*V_(k-1). - L. Edson Jeffery, Jan 20 2012
Conjecture that antidiagonal sums are A023855. - L. Edson Jeffery, Jan 20 2012
Viewed as a sequence of rows, consider the subsequences (of rows) that contain every positive integer. The lexicographically latest of these subsequences consists of the rows with row numbers in A066680 U {1}; this is the only one that contains its own row numbers only once. - Peter Munn, Dec 04 2019

Examples

			Triangle begins:
  1;
  2,  4;
  3,  6,  9;
  4,  8, 12, 16;
  5, 10, 15, 20, 25;
  6, 12, 18, 24, 30, 36;
		

Crossrefs

A002411 gives the sum of the n-th row. A141419 is similarly derived.
Cf. A003991 (square multiplication table).
Main diagonal gives A000290.

Programs

  • Haskell
    a075362 n k = a075362_tabl !! (n-1) !! (k-1)
    a075362_row n = a075362_tabl !! (n-1)
    a075362_tabl = zipWith (zipWith (*)) a002260_tabl a002024_tabl
    -- Reinhard Zumkeller, Nov 11 2012, Oct 04 2012
  • Maple
    T(n,k):=piecewise(k<=n,sum(i*binomial(k,i)*binomial(n+1-k,n-i),i=1..k),k>n,0) # Mircea Merca, Apr 11 2012
  • Mathematica
    Table[NestList[n+#&,n,n-1],{n,15}]//Flatten (* Harvey P. Dale, Jun 14 2022 *)

Formula

T(n,k) = n*k, 1 <= k <= n. - Reinhard Zumkeller, Mar 07 2010
T(n,k) = A050873(n,k)*A051173(n,k), 1 <= k <= n. - Reinhard Zumkeller, Apr 25 2011
T(n,k) = Sum_{i=1..k} i*binomial(k,i)*binomial(n+1-k,n-i), 1 <= k <= n. - Mircea Merca, Apr 11 2012
T(n,k) = A002260(n,k)*A002024(n,k) = (A215630(n,k)-A215631(n,k))/2, 1 <= k <= n. - Reinhard Zumkeller, Nov 11 2012
a(n) = A223544(n) - 1; a(n) = i*(t+1), where i = n - t*(t+1)/2, t = floor((-1 + sqrt(8*n-7))/2). - Boris Putievskiy, Jul 24 2013

Extensions

More terms from Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Apr 20 2003

A198409 Positions in sequences A198384, A198385 and A198386 to indicate triples of squares in arithmetic progression, that are not multiples of earlier triples.

Original entry on oeis.org

1, 3, 5, 7, 10, 13, 15, 23, 24, 26, 30, 35, 39, 42, 45, 47, 51, 54, 62, 69, 70, 72, 83, 84, 88, 97, 98, 102, 107, 114, 115, 124, 126, 129, 136, 141, 142, 143, 156, 157, 167, 169, 172, 177, 181, 188, 191, 201, 205, 208, 214, 218, 229, 230, 237, 244, 249, 253
Offset: 1

Views

Author

Reinhard Zumkeller, Oct 25 2011

Keywords

Comments

A198435(n) = A198384(a(n)); A198439(n) = A198388(a(n));
A198436(n) = A198385(a(n)); A198440(n) = A198389(a(n));
A198437(n) = A198386(a(n)); A198441(n) = A198390(a(n));
A198438(n) = A198387(a(n)).

Programs

  • Haskell
    import Data.List (elemIndices)
    a198409 n = a198409_list !! (n-1)
    a198409_list = map (+ 1) $ elemIndices 1 $ map a008966 $
       zipWith gcd a198384_list $ zipWith gcd a198385_list a198386_list
  • Mathematica
    wmax = 1000;
    triples[w_] := Reap[Module[{u, v}, For[u = 1, u < w, u++, If[IntegerQ[v = Sqrt[(u^2 + w^2)/2]], Sow[{u^2, v^2, w^2}]]]]][[2]];
    tt = Flatten[DeleteCases[triples /@ Range[wmax], {}], 2];
    Position[tt, t_List /; SquareFreeQ[GCD@@t]] // Flatten (* Jean-François Alcover, Oct 24 2021 *)

Formula

A051537 Triangle read by rows: T(i,j) = lcm(i,j)/gcd(i,j) for 1 <= j <= i.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane and Amarnath Murthy, May 10 2002

Keywords

Comments

From Robert G. Wilson v, May 10 2002: (Start)
The first term of the k-th row is k. The first leading diagonal contains all 1's. The second leading diagonal contains twice the triangular numbers = n*(n-1).
For p prime, the sum of the p-th row is (p^3 - p^2 + 2)/2.
Proof: The p-th row is p, 2*p, 3*p, ..., (p-2)*p, (p-1)*p, 1. The sum of the row = p*(1 + 2 + 3 + ... + (p-2) + (p-1)) + 1 = p*(p-1)*p/2 + 1 = (p^3 - p^2 + 2)/2. (End) [Edited by Petros Hadjicostas, May 27 2020]
In the square array where T(i,j) = T(j,i), the natural extension of the triangle, each set of rows and columns with common indices [d1, d2, ..., ds] define a group multiplication table on their grid, if the d1, d2, ..., ds are the set of divisors of a squarefree number [A. Jorza]. - R. J. Mathar, May 03 2007
T(n,k) is the minimum number of squares necessary to fill a rectangle with sides of length n and k. - Stefano Spezia, Oct 06 2018

Examples

			Triangle T(n,k) (with rows n >= 1 and columns k = 1..n) begins
  1;
  2,  1;
  3,  6,  1;
  4,  2, 12,  1;
  5, 10, 15, 20,  1;
  6,  3,  2,  6, 30,  1;
  7, 14, 21, 28, 35, 42,  1;
  8,  4, 24,  2, 40, 12, 56,  1;
  ...
		

Crossrefs

Diagonals give A002378, A070260, A070261, A070262.
Row sums give A056789.

Programs

  • GAP
    Flat(List([1..13],n->List([1..n],k->Lcm(n,k)/Gcd(n,k)))); # Muniru A Asiru, Oct 06 2018
    
  • Haskell
    a051537 n k = a051537_tabl !! (n-1) !! (k-1)
    a051537_row n = a051537_tabl !! (n-1)
    a051537_tabl = zipWith (zipWith div) a051173_tabl a050873_tabl
    -- Reinhard Zumkeller, Jul 07 2013
    
  • Magma
    /* As triangle */ [[Lcm(n,k)/Gcd(n,k): k in [1..n]]: n in [1.. 15]]; // Vincenzo Librandi, Oct 07 2018
  • Maple
    T:=proc(n,k) n*k/gcd(n,k)^2; end proc: seq(seq(T(n,k),k=1..n),n=1..13); # Muniru A Asiru, Oct 06 2018
  • Mathematica
    Flatten[ Table[ LCM[i, j] / GCD[i, j], {i, 1, 13}, {j, 1, i}]]
    T[n_,k_]:=n*k/GCD[n,k]^2; Flatten[Table[T[n,k],{k,1,13},{n,1,k}]] (* Stefano Spezia, Oct 06 2018 *)

Formula

T(n,k) = A054531(n,k)*A164306(n,k). - Reinhard Zumkeller, Oct 30 2009
T(n,k) = A051173(n,k) / A050873(n,k). - Reinhard Zumkeller, Jul 07 2013
T(n,k) = n*k/gcd(n,k)^2. - Stefano Spezia, Oct 06 2018

Extensions

More terms from Robert G. Wilson v, May 10 2002

A067911 Product of gcd(k,n) for 1 <= k <= n.

Original entry on oeis.org

1, 2, 3, 8, 5, 72, 7, 128, 81, 800, 11, 41472, 13, 6272, 30375, 32768, 17, 3359232, 19, 20480000, 750141, 247808, 23, 13759414272, 15625, 1384448, 1594323, 5035261952, 29, 30233088000000, 31, 2147483648, 235782657, 37879808
Offset: 1

Views

Author

Sharon Sela (sharonsela(AT)hotmail.com), Mar 10 2002

Keywords

Crossrefs

In A018804 the product is replaced by sum.
Product of terms in n-th row of A050873.
Cf. A000010 (comments on product formulas).

Programs

  • Maple
    with(numtheory): a := n -> mul(d^phi(n/d), d = divisors(n)):
    seq(a(i), i = 1..34); # Peter Luschny, Apr 07 2013
  • Mathematica
    a[n_] := Product[d^EulerPhi[n/d], {d, Divisors[n]}];
    Array[a, 34] (* Jean-François Alcover, Jun 03 2019 *)
  • PARI
    a(n) = prod(k=1, n, gcd(k, n)); \\ Michel Marcus, Aug 23 2016
  • Sage
    A067911 = lambda n: mul(gcd(n,i) for i in range(n))
    [A067911(n) for n in (1..34)] # Peter Luschny, Apr 07 2013
    

Formula

a(n) = Product_{d|n} d^phi(n/d). - Vladeta Jovovic, Mar 08 2004
a(n) = n*A051190(n). - Peter Luschny, Apr 07 2013
a(n) = Product_{k=1..n} (n/gcd(n,k))^(phi(gcd(n,k))/phi(n/gcd(n,k))) where phi = A000010. - Richard L. Ollerton, Nov 07 2021

Extensions

Extended and edited by John W. Layman, Mar 14 2002

A374433 Triangle read by rows: T(n, k) = Product_{p in PF(n) intersect PF(k)} p, where PF(a) is the set of the prime factors of a.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 1, 1, 3, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 5, 1, 1, 2, 3, 2, 1, 6, 1, 1, 1, 1, 1, 1, 1, 7, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 2, 1, 2, 5, 2, 1, 2, 1, 10, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 11, 1, 1, 2, 3, 2, 1, 6, 1, 2, 3, 2, 1, 6
Offset: 0

Views

Author

Peter Luschny, Jul 10 2024

Keywords

Examples

			  [ 0]  1;
  [ 1]  1, 1;
  [ 2]  1, 1, 2;
  [ 3]  1, 1, 1, 3;
  [ 4]  1, 1, 2, 1, 2;
  [ 5]  1, 1, 1, 1, 1, 5;
  [ 6]  1, 1, 2, 3, 2, 1, 6;
  [ 7]  1, 1, 1, 1, 1, 1, 1, 7;
  [ 8]  1, 1, 2, 1, 2, 1, 2, 1, 2;
  [ 9]  1, 1, 1, 3, 1, 1, 3, 1, 1, 3;
  [10]  1, 1, 2, 1, 2, 5, 2, 1, 2, 1, 10;
  [11]  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,  1, 11;
		

Crossrefs

Family: this sequence (intersection), A374434 (symmetric difference), A374435 (difference), A374436 (union).
Cf. A007947 (main diagonal and central terms), A374432 (row sums), A374431 (row product).

Programs

  • Maple
    PF := n -> ifelse(n = 0, {}, NumberTheory:-PrimeFactors(n)):
    A374433 := (n, k) -> mul(PF(n) intersect PF(k)):
    seq(seq(A374433(n, k), k = 0..n), n = 0..12);
  • Mathematica
    nn = 12; Do[Set[s[i], FactorInteger[i][[All, 1]]], {i, 0, nn}]; s[0] = {1};
    Table[Times @@ Intersection[s[k], s[n]], {n, 0, nn}, {k, 0, n}] // Flatten (* Michael De Vlieger, Jul 11 2024 *)
  • Python
    from math import prod
    from sympy import primefactors
    def PF(n): return set(primefactors(n)) if n > 0 else set({})
    def PrimeIntersect(n, k): return prod(PF(n).intersection(PF(k)))
    def PrimeSymDiff(n, k): return prod(PF(n).symmetric_difference(PF(k)))
    def PrimeUnion(n, k): return prod(PF(n).union(PF(k)))
    def PrimeDiff(n, k): return prod(PF(n).difference(PF(k)))
    A374433 = PrimeIntersect; A374434 = PrimeSymDiff
    A374435 = PrimeDiff; A374436 = PrimeUnion
    for n in range(11): print([A374433(n, k) for k in range(n + 1)])

Formula

T(n, k) = 1 for k = 0, for k > 0: T(n, k) = rad(gcd(n, k)), where rad = A007947 and gcd = A050873. - Michael De Vlieger, Jul 11 2024

A345417 Table read by upward antidiagonals: Given m, n >= 1, write gcd(prime(m),prime(n)) as d = u*prime(m)+v*prime(n) where u, v are minimal; T(m,n) = u.

Original entry on oeis.org

0, 1, -1, 1, 0, -2, 1, -1, 2, -3, 1, 1, 0, -2, -5, 1, -1, -2, 3, 4, -6, 1, 1, 1, 0, -2, -4, -8, 1, -1, 2, 2, -3, -5, 6, -9, 1, 1, -2, -1, 0, 2, 7, -6, -11, 1, -1, -1, -2, -5, 6, 5, 4, 8, -14, 1, -1, 2, 3, 2, 0, -3, -8, -9, 10, -15, 1, 1, -1, -3, -4, -3, 4, 7, 10, 6, -10, -18
Offset: 1

Views

Author

N. J. A. Sloane, Jun 19 2021

Keywords

Comments

The gcd is 1 unless m=n when it is m; v is given in A345418. Minimal means minimize u^2+v^2. We follow Maple, PARI, etc., in setting u=0 and v=1 when m=n. If we ignore the diagonal, the v table is the transpose of the u table.

Examples

			The u table (this entry) begins:
[0, -1, -2, -3, -5, -6, -8, -9, -11, -14, -15, -18, -20, -21, -23, -26]
[1, 0, 2, -2, 4, -4, 6, -6, 8, 10, -10, -12, 14, -14, 16, 18]
[1, -1, 0, 3, -2, -5, 7, 4, -9, 6, -6, 15, -8, -17, 19, -21]
[1, 1, -2, 0, -3, 2, 5, -8, 10, -4, 9, 16, 6, -6, -20, -15]
[1, -1, 1, 2, 0, 6, -3, 7, -2, 8, -14, -10, 15, 4, -17, -24]
[1, 1, 2, -1, -5, 0, 4, 3, -7, 9, 12, -17, 19, 10, -18, -4]
[1, -1, -2, -2, 2, -3, 0, 9, -4, 12, 11, -13, -12, -5, -11, 25]
[1, 1, -1, 3, -4, -2, -8, 0, -6, -3, -13, 2, 13, -9, 5, 14]
[1, -1, 2, -3, 1, 4, 3, 5, 0, -5, -4, -8, -16, 15, -2, -23]
[1, -1, -1, 1, -3, -4, -7, 2, 4, 0, 15, -14, 17, 3, 13, 11]
[1, 1, 1, -2, 5, -5, -6, 8, 3, -14, 0, 6, 4, -18, -3, 12]
[1, 1, -2, -3, 3, 6, 6, -1, 5, 11, -5, 0, 10, 7, 14, -10]
...
The v table (A345418) begins:
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
[-1, 1, -1, 1, -1, 1, -1, 1, -1, -1, 1, 1, -1, 1, -1, -1]
[-2, 2, 1, -2, 1, 2, -2, -1, 2, -1, 1, -2, 1, 2, -2, 2]
[-3, -2, 3, 1, 2, -1, -2, 3, -3, 1, -2, -3, -1, 1, 3, 2]
[-5, 4, -2, -3, 1, -5, 2, -4, 1, -3, 5, 3, -4, -1, 4, 5]
[-6, -4, -5, 2, 6, 1, -3, -2, 4, -4, -5, 6, -6, -3, 5, 1]
[-8, 6, 7, 5, -3, 4, 1, -8, 3, -7, -6, 6, 5, 2, 4, -8]
[-9, -6, 4, -8, 7, 3, 9, 1, 5, 2, 8, -1, -6, 4, -2, -5]
[-11, 8, -9, 10, -2, -7, -4, -6, 1, 4, 3, 5, 9, -8, 1, 10]
[-14, 10, 6, -4, 8, 9, 12, -3, -5, 1, -14, 11, -12, -2, -8, -6]
[-15, -10, -6, 9, -14, 12, 11, -13, -4, 15, 1, -5, -3, 13, 2, -7]
[-18, -12, 15, 16, -10, -17, -13, 2, -8, -14, 6, 1, -9, -6, -11, 7]
...
		

Crossrefs

Previous Showing 11-20 of 52 results. Next