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 10 results.

A070262 5th diagonal of triangle defined in A051537.

Original entry on oeis.org

5, 3, 21, 2, 45, 15, 77, 6, 117, 35, 165, 12, 221, 63, 285, 20, 357, 99, 437, 30, 525, 143, 621, 42, 725, 195, 837, 56, 957, 255, 1085, 72, 1221, 323, 1365, 90, 1517, 399, 1677, 110, 1845, 483, 2021, 132, 2205, 575, 2397, 156, 2597, 675, 2805, 182, 3021, 783
Offset: 1

Views

Author

Amarnath Murthy, May 09 2002

Keywords

Crossrefs

Cf. A061037. [From R. J. Mathar, Sep 29 2008]

Programs

  • Magma
    [LCM(n + 4, n)/GCD(n + 4, n): n in [1..50]]; // G. C. Greubel, Sep 20 2018
  • Mathematica
    Table[ LCM[i + 4, i] / GCD[i + 4, i], {i, 1, 60}]
    LinearRecurrence[{0,0,0,3,0,0,0,-3,0,0,0,1},{5,3,21,2,45,15,77,6,117,35,165,12},90] (* Harvey P. Dale, Jul 13 2019 *)
  • PARI
    Vec(x*(5 + 3*x + 21*x^2 + 2*x^3 + 30*x^4 + 6*x^5 + 14*x^6 - 3*x^8 - x^9 - 3*x^10) / ((1 - x)^3*(1 + x)^3*(1 + x^2)^3) + O(x^60)) \\ Colin Barker, Mar 27 2017
    
  • PARI
    a(n) = lcm(n+4,n)/gcd(n+4,n); \\ Altug Alkan, Sep 20 2018
    

Formula

a(n) = lcm(n + 4, n) / gcd(n + 4, n).
From Colin Barker, Mar 27 2017: (Start)
G.f.: x*(5 + 3*x + 21*x^2 + 2*x^3 + 30*x^4 + 6*x^5 + 14*x^6 - 3*x^8 - x^9 - 3*x^10) / ((1 - x)^3*(1 + x)^3*(1 + x^2)^3).
a(n) = 3*a(n-4) - 3*a(n-8) + a(n-12) for n>12. (End)
From Luce ETIENNE, May 10 2018: (Start)
a(n) = n*(n+4)*4^((5*(n mod 4)^3 - 24*(n mod 4)^2 + 31*(n mod 4)-12)/6).
a(n) = n*(n+4)*(37-27*cos(n*Pi)-6*cos(n*Pi/2))/64. (End)
From Amiram Eldar, Oct 08 2023: (Start)
Sum_{n>=1} 1/a(n) = 11/6.
Sum_{n>=1} (-1)^n/a(n) = 7/6.
Sum_{k=1..n} a(k) ~ (37/192) * n^3. (End)

Extensions

Edited by Robert G. Wilson v, May 10 2002

A070260 Third diagonal of triangle defined in A051537.

Original entry on oeis.org

3, 2, 15, 6, 35, 12, 63, 20, 99, 30, 143, 42, 195, 56, 255, 72, 323, 90, 399, 110, 483, 132, 575, 156, 675, 182, 783, 210, 899, 240, 1023, 272, 1155, 306, 1295, 342, 1443, 380, 1599, 420, 1763, 462, 1935, 506, 2115, 552, 2303, 600, 2499, 650, 2703, 702
Offset: 1

Views

Author

Amarnath Murthy, May 09 2002

Keywords

Crossrefs

Bisections: A002378, A000466.
Cf. A051537.

Programs

  • Mathematica
    Table[ LCM[i + 2, i] / GCD[i + 2, i], {i, 1, 60}]
    LinearRecurrence[{0,3,0,-3,0,1},{3,2,15,6,35,12},60] (* Harvey P. Dale, Sep 14 2019 *)
  • PARI
    Vec(x*(3+2*x+6*x^2-x^4) / (1-x^2)^3 + O(x^60)) \\ Colin Barker, Mar 27 2017

Formula

From Vladeta Jovovic, May 09 2002: (Start)
a(n) = n*(n+2)/4 if n is even else n*(n+2).
a(n) = 3*a(n-2) - 3*a(n-4) + a(n-6).
G.f.: x*(3 + 2*x + 6*x^2 - x^4)/(1 - x^2)^3. (End)
E.g.f.: (x/4)*((12 + x)*cosh(x) + (3 + 4*x)*sinh(x)). - G. C. Greubel, Jul 20 2017
From Amiram Eldar, Oct 08 2023: (Start)
Sum_{n>=1} 1/a(n) = 3/2.
Sum_{n>=1} (-1)^n/a(n) = 1/2.
Sum_{k=1..n} a(k) ~ (5/24) * n^3. (End)

Extensions

More terms from Vladeta Jovovic, May 09 2002

A070261 4th diagonal of triangle defined in A051537.

Original entry on oeis.org

4, 10, 2, 28, 40, 6, 70, 88, 12, 130, 154, 20, 208, 238, 30, 304, 340, 42, 418, 460, 56, 550, 598, 72, 700, 754, 90, 868, 928, 110, 1054, 1120, 132, 1258, 1330, 156, 1480, 1558, 182, 1720, 1804, 210, 1978, 2068, 240, 2254, 2350, 272, 2548, 2650, 306, 2860
Offset: 1

Views

Author

Amarnath Murthy, May 09 2002

Keywords

Crossrefs

Cf. A051537.

Programs

  • Mathematica
    Table[ LCM[i + 3, i] / GCD[i + 3, i], {i, 1, 60}]
  • PARI
    Vec(2*x*(2 + 5*x + x^2 + 8*x^3 + 5*x^4 - x^6 - x^7) / ((1 - x)^3*(1 + x + x^2)^3) + O(x^60)) \\ Colin Barker, Mar 27 2017

Formula

a(n) = lcm(n + 3, n) / gcd(n + 3, n).
From Colin Barker, Mar 27 2017: (Start)
G.f.: 2*x*(2 + 5*x + x^2 + 8*x^3 + 5*x^4 - x^6 - x^7) / ((1 - x)^3*(1 + x + x^2)^3).
a(n) = 3*a(n-3) - 3*a(n-6) + a(n-9) for n>9.
(End)
From Amiram Eldar, Oct 08 2023: (Start)
Sum_{n>=1} 1/a(n) = 3/2.
Sum_{n>=1} (-1)^n/a(n) = 22*log(2)/9 - 7/6.
Sum_{k=1..n} a(k) ~ (19/81) * n^3. (End)

Extensions

Edited by Robert G. Wilson v, May 10 2002

A050873 Triangular array T read by rows: T(n,k) = gcd(n,k).

Original entry on oeis.org

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

Views

Author

Keywords

Comments

The function T(n,k) = T(k,n) is defined for all integer k,n but only the values for 1 <= k <= n as a triangular array are listed here.
For each divisor d of n, the number of d's in row n is phi(n/d). Furthermore, if {a_1, a_2, ..., a_phi(n/d)} is the set of positive integers <= n/d that are relatively prime to n/d then T(n,a_i * d) = d. - Geoffrey Critzer, Feb 22 2015
Starting with any row n and working downwards, consider the infinite rectangular array with k = 1..n. A repeating pattern occurs every A003418(n) rows. For example, n=3: A003418(3) = 6. The 6-row pattern starting with row 3 is {1,1,3}, {1,2,1}, {1,1,1}, {1,2,3}, {1,1,1}, {1,2,1}, and this pattern repeats every 6 rows, i.e., starting with rows {9,15,21,27,...}. - Bob Selcoe and Jamie Morken, Aug 02 2017

Examples

			Rows:
  1;
  1, 2;
  1, 1, 3;
  1, 2, 1, 4;
  1, 1, 1, 1, 5;
  1, 2, 3, 2, 1, 6; ...
		

Crossrefs

Cf. A003989.
Cf. A018804 (row sums), A245717.
Cf. A132442 (sums of divisors).
Cf. A003418.

Programs

  • Haskell
    a050873 = gcd
    a050873_row n = a050873_tabl !! (n-1)
    a050873_tabl = zipWith (map . gcd ) [1..] a002260_tabl
    -- Reinhard Zumkeller, Dec 12 2015, Aug 13 2013, Jun 10 2013
  • Mathematica
    ColumnForm[Table[GCD[n, k], {k, 12}, {n, k}], Center] (* Alonso del Arte, Jan 14 2011 *)
  • PARI
    {T(n, k) = gcd(n, k)} /* Michael Somos, Jul 18 2011 */
    

Formula

a(n) = gcd(A002260(n), A002024(n)); A054521(n) = A000007(a(n)). - Reinhard Zumkeller, Dec 02 2009
T(n,k) = A075362(n,k)/A051173(n,k), 1 <= k <= n. - Reinhard Zumkeller, Apr 25 2011
T(n, k) = T(k, n) = T(-n, k) = T(n, -k) = T(n, n+k) = T(n+k, k). - Michael Somos, Jul 18 2011
T(n,k) = A051173(n,k) / A051537(n,k). - Reinhard Zumkeller, Jul 07 2013

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

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

Original entry on oeis.org

1, 3, 10, 19, 51, 48, 148, 147, 253, 253, 606, 352, 1015, 738, 960, 1171, 2313, 1263, 3250, 1869, 2803, 3028, 5820, 2784, 6301, 5073, 6814, 5458, 11775, 4798, 14416, 9363, 11505, 11563, 14898, 9343, 24643, 16248, 19276, 14797, 33621, 14013, 38830
Offset: 1

Views

Author

Leroy Quet, Aug 20 2000

Keywords

Comments

For prime p, a(p) = 1 + p^2*(p-1)/2.
We note lcm(k,n) = k*n iff gcd(k,n) = 1 (and in general lcm(k,n) equals k*n/gcd(k,n)), and so for these values LCM/GCD = k*n. From A023896, we have that Sum_{k=1..n-1: gcd(k,n)=1} k = n*phi(n)/2, and so Sum_{k=1..n-1: gcd(k,n)=1} k*n = n * Sum_{k=1..n-1: gcd(k,n)=1} k = n^2*phi(n)/2. As this is true, certainly Sum_{k=1..n} lcm(k,n)/gcd(k,n) > n^2*phi(n)/2. - Jon Perry, Nov 09 2014 [Edited by Petros Hadjicostas, May 27 2020]
Conjecture: for prime p, a(p^n) = 1 + (1/2)*(p - 1)*p^2*(p^(3*n) - 1)/(p^3 - 1) for n = 1,2,3,.... Cf. A339384. - Peter Bala, Dec 04 2020
The conjecture can be proven by splitting up the sum like this: a(p^n) = 1 + Sum_{1 <= r < p^n if gcd(p,r) = 1} lcm(p^n,r)/gcd(p^n,r) + Sum_{1 <= r < p^(n-1) if gcd(p,r) = 1} lcm(p^n,p*r)/gcd(p^n,p*r) + … + Sum_{1 <= r < p if gcd(p,r) = 1} lcm(p^n,p^(n-1)*r)/gcd(p^n,p^(n-1)*r) = 1 + Sum_{1 <= r < p^n if gcd(p,r) = 1} p^n*r + Sum_{1 <= r < p^(n-1) if gcd(p,r) = 1} p^(n-1)*r + … + Sum_{1 <= r < p if gcd(p,r) = 1} p*r = 1 + p^n*(1/2)*p^n*phi(p^n) + p^(n-1)*(1/2)*p^(n-1)*phi(p^(n-1)) + … + p*(1/2)*p*phi(p) = 1 + (1/2)*(p-1)*Sum_{k=1..n} p^(3k-1) = 1 + (1/2)*(p-1)*p^2*(p^(3*n)-1)/(p^3-1). - Sebastian Karlsson, Dec 07 2020

Examples

			a(6) = 6/1 + 6/2 + 6/3 + 12/2 + 30/1 + 6/6 = 48.
		

Crossrefs

Row sums of triangle in A051537.

Programs

  • Haskell
    a056789 = sum . a051537_row  -- Reinhard Zumkeller, Jul 07 2013
    
  • Mathematica
    Table[ Sum[ LCM[k, n] / GCD[k, n], {k, 1, n}], {n, 1, 50}]
    f[p_, e_] := p^2*(p-1)*(p^(3*e)-1)/(p^3-1)+1; a[1] = 1; a[n_] := (1 + Times @@ f @@@ FactorInteger[n])/2; Array[a, 40] (* Amiram Eldar, Oct 05 2023 *)
  • PARI
    vector(50, n, sum(k=1, n, lcm(k,n)/gcd(k,n))) \\ Michel Marcus, Nov 08 2014
    
  • PARI
    a(n) = sumdiv(n, d, if(d>1, d^2*eulerphi(d)/2, 1)); \\ Daniel Suteu, Dec 10 2020

Formula

a(n) > n^2*phi(n)/2. - Thomas Ordowski, Nov 08 2014
a(n) = Sum_{k=1..n} k*n/gcd(k,n)^2. - Thomas Ordowski, Nov 08 2014
a(n) = (1/2)*Sum_{d|n} d^2*(d+1) Sum_{j|n/d} mu(j)*j^2. - Felix A. Pahl, Nov 23 2019
a(n) = 1 + Sum_{d|n, d > 1} phi(d^3)/2. - Daniel Suteu, Dec 10 2020
From Amiram Eldar, Oct 05 2023: (Start)
a(n) = (A068963(n)+1)/2.
Sum_{k=1..n} a(k) ~ (Pi^2/120) * n^4. (End)
a(n) < n^3 / 2, n > 1. - Bill McEachen, Jul 18 2024
Hence n^3/log log n << a(n) << n^3. - Charles R Greathouse IV, Jul 25 2024

Extensions

Additional comments from Amarnath Murthy, May 09 2002

A083555 Quotient of LCM of prime(n+1)-1 and prime(n)-1 and GCD of the same two numbers.

Original entry on oeis.org

2, 2, 6, 15, 30, 12, 72, 99, 154, 210, 30, 90, 420, 483, 598, 754, 870, 110, 1155, 1260, 156, 1599, 1804, 132, 600, 2550, 2703, 2862, 756, 72, 4095, 4420, 4692, 5106, 5550, 650, 702, 6723, 7138, 7654, 8010, 342, 9120, 2352, 9702, 1155, 1295, 12543, 12882
Offset: 1

Views

Author

Labos Elemer, May 22 2003

Keywords

Examples

			n=25: prime(25)=97, prime(26)=101; a(25) = lcm(96,100)/gcd(96,100) = 2400/4 = 600.
		

Crossrefs

Programs

  • Maple
    P:= seq(ithprime(i),i=1..100):
    seq(ilcm(P[i+1]-1,P[i]-1)/igcd(P[i+1]-1,P[i]-1),i=1..99); # Robert Israel, Jun 11 2017
  • Mathematica
    f[x_] := Prime[x]-1 Table[LCM[f[w+1], f[w]]/GCD[f[w+1], f[w]], {w, 1, 128}]
    (* Second program: *)
    Table[Apply[LCM[#1, #2]/GCD[#1, #2] &, Prime[n + {1, 0}] - 1], {n, 49}] (* Michael De Vlieger, Jun 11 2017 *)
  • PARI
    first(n)=my(v=vector(n),p=2,k,g); forprime(q=3,, g=gcd(p-1,q-1); v[k++]=(p-1)*(q-1)/g^2; p=q; if(k==n, break)); v \\ Charles R Greathouse IV, Jun 11 2017

Formula

a(n) = lcm(A006093(n+1), A006093(n))/gcd(A006093(n+1), A006093(n));
a(n) = A083554(n)/A058263(n).
a(n) = A051537(A006093(n+1), A006093(n)). - Robert Israel, Jun 11 2017

A164306 Triangle read by rows: T(n, k) = k / gcd(k, n), 1 <= k <= n.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Aug 12 2009

Keywords

Comments

Also the gcd of the coefficients of the partition polynomials (called 'De Moivre polynomials' by O'Sullivan, see link, Theorem 4.1). - Peter Luschny, Sep 20 2022

Examples

			From _Indranil Ghosh_, Feb 14 2017: (Start)
Triangle begins:
1,
1, 1,
1, 2, 1,
1, 1, 3, 1,
1, 2, 3, 4, 1,
1, 1, 1, 2, 5, 1,
1, 2, 3, 4, 5, 6, 1,
. . .
T(4,3) = 3 / gcd(3,4) = 3 / 1 = 3. (End)
		

Crossrefs

Programs

  • Maple
    seq(seq(k / igcd(n, k), k = 1..n), n = 1..13); # Peter Luschny, Sep 20 2022
  • Mathematica
    Flatten[Table[k/GCD[k,n],{n,20},{k,n}]] (* Harvey P. Dale, Jul 21 2013 *)
  • PARI
    for(n=0,10, for(k=1,n, print1(k/gcd(k,n), ", "))) \\ G. C. Greubel, Sep 13 2017

Formula

Sum of n-th row = A057661(n).
T(n, k) = A051537(n, k)/A054531(n, k). - Reinhard Zumkeller, Oct 30 2009

A338797 Triangle read by rows: T(n,k) is the least m such that there exist positive integers x, y and z satisfying x/n + y/k = z/m where all fractions are reduced; 1 <= k <= n.

Original entry on oeis.org

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

Views

Author

Peter Kagey, Nov 09 2020

Keywords

Examples

			Table begins:
  n\k|  1   2   3   4   5   6   7   8   9  10   11 12
  ---+-----------------------------------------------
   1 |  1,
   2 |  2,  1,
   3 |  3,  6,  1,
   4 |  4,  4, 12,  1,
   5 |  5, 10, 15, 20,  1,
   6 |  6,  3,  2, 12, 30,  1,
   7 |  7, 14, 21, 28, 35, 42,  1,
   8 |  8,  8, 24,  8, 40, 24, 56,  1,
   9 |  9, 18,  9, 36, 45, 18, 63, 72,  1,
  10 | 10,  5, 30, 20,  2, 15, 70, 40, 90,   1,
  11 | 11, 22, 33, 44, 55, 66, 77, 88, 99, 110,  1,
  12 | 12, 12,  4,  3, 60,  4, 84, 24, 36, 60, 132, 1.
T(20,10) = 4 because 1/20 + 7/10 = 3/4, and there is no choice of numerators on the left that results in a smaller denominator on the right.
		

Crossrefs

Programs

  • Haskell
    import Data.Ratio ((%), denominator)
    farey n = [k % n | k <- [1..n], gcd n k == 1]
    a338797T n k = minimum [denominator $ a + b | a <- farey n, b <- farey k]

Formula

A051537(n,k) <= T(n,k) <= A221918(n,k) <= lcm(n,k) = A051173(n,k).
T(n,k) = lcm(n,k) when gcd(n,k) = 1.

A333493 a(n) = Sum_{k=1..n} (-1)^(k+1) * lcm(n,k) / gcd(n,k).

Original entry on oeis.org

1, 1, -2, 13, -9, 28, -20, 109, -11, 151, -54, 256, -77, 442, 48, 877, -135, 757, -170, 1363, 103, 1816, -252, 2080, -59, 3043, -38, 3982, -405, 2878, -464, 7021, 273, 6937, 390, 6817, -665, 9748, 388, 11059, -819, 8407, -902, 16348, 219, 17458, -1080, 16672, -167
Offset: 1

Views

Author

Ilya Gutkovskiy, Mar 24 2020

Keywords

Crossrefs

Alternating row sums of A051537.

Programs

  • Mathematica
    Table[Sum[(-1)^(k + 1) LCM[n, k]/GCD[n, k], {k, 1, n}], {n, 1, 49}]
  • PARI
    a(n) = sum(k=1, n, (-1)^(k+1)*lcm(n, k)/gcd(n, k)); \\ Michel Marcus, Mar 24 2020

Formula

If n odd, a(n) = (1/2) * n * Sum_{d|n} Sum_{j|d} (-1)^(j + 1) * mu(d/j) * (n + d) / j^2.
If n even, a(n) = (1/2) * n^2 * Sum_{d|n} Sum_{j|d} (-1)^(j + 1) * mu(d/j) * (n + d) / (d * j^2).
Showing 1-10 of 10 results.