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-5 of 5 results.

A003990 Table of lcm(x,y), read along antidiagonals.

Original entry on oeis.org

1, 2, 2, 3, 2, 3, 4, 6, 6, 4, 5, 4, 3, 4, 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, 12, 5, 12, 21, 8, 9, 10, 18, 24, 28, 30, 30, 28, 24, 18, 10, 11, 10, 9, 8, 35, 6, 35, 8, 9, 10, 11, 12, 22, 30, 36, 40, 42, 42, 40, 36, 30, 22, 12, 13, 12, 33, 20, 45, 24
Offset: 1

Views

Author

Keywords

Comments

A(x,x) = x on the diagonal. - Reinhard Zumkeller, Aug 05 2012

Examples

			The symmetric array is lcm(x,y) = lcm(y,x):
   1  2  3  4  5  6  7  8  9 10 ...
   2  2  6  4 10  6 14  8 18 10 ...
   3  6  3 12 15  6 21 24  9 30 ...
   4  4 12  4 20 12 28  8 36 20 ...
   5 10 15 20  5 30 35 40 45 10 ...
   6  6  6 12 30  6 42 24 18 30 ...
   7 14 21 28 35 42  7 56 63 70 ...
   8  8 24  8 40 24 56  8 72 40 ...
   9 18  9 36 45 18 63 72  9 90 ...
  10 10 30 20 10 30 70 40 90 10 ...
		

Crossrefs

A(x, y) = A075174(A003986(A075173(x), A075173(y))) = A075176(A003986(A075175(x), A075175(y))).
Antidiagonal sums are in A006580.
Cf. A002260.

Programs

  • Haskell
    a003990 x y = a003990_adiag x !! (y-1)
    a003990_adiag n = a003990_tabl !! (n-1)
    a003990_tabl = zipWith (zipWith lcm) a002260_tabl $ map reverse a002260_tabl
    -- Reinhard Zumkeller, Aug 05 2012
    
  • Mathematica
    Table[ LCM[x-y, y], {x, 1, 14}, {y, 1, x-1}] // Flatten (* Jean-François Alcover, Aug 20 2013 *)
  • PARI
    A(x,y)=lcm(x,y) \\ Charles R Greathouse IV, Feb 06 2017

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).

A209295 Antidiagonal sums of the gcd(.,.) array A109004.

Original entry on oeis.org

0, 2, 5, 8, 12, 14, 21, 20, 28, 30, 37, 32, 52, 38, 53, 60, 64, 50, 81, 56, 92, 86, 85, 68, 124, 90, 101, 108, 132, 86, 165, 92, 144, 138, 133, 152, 204, 110, 149, 164, 220, 122, 237, 128, 212, 234, 181, 140, 288, 182, 245, 216, 252, 158, 297, 244
Offset: 0

Views

Author

R. J. Mathar, Jan 17 2013

Keywords

Crossrefs

Programs

  • Magma
    A209295:= func< n | n eq 0 select 0 else (&+[(n/d+1)*EulerPhi(d): d in Divisors(n)]) >;
    [A209295(n): n in [0..40]]; // G. C. Greubel, Jun 24 2024
    
  • Maple
    a:= n-> add(igcd(j, n-j), j=0..n):
    seq(a(n), n=0..70);  # Alois P. Heinz, Aug 25 2019
    # Alternative (computes [a(n), n=0..10000] about 25 times faster):
    a := n -> add(numtheory:-phi(d)*(n/d + 1), d = numtheory:-divisors(n)):
    seq(a(n), n = 0..57); # Peter Luschny, Aug 25 2019
  • Mathematica
    Table[Sum[GCD[n-k,k], {k,0,n}], {n,0,50}] (* G. C. Greubel, Jan 04 2018 *)
    f[p_, e_] := (e*(p - 1)/p + 1)*p^e; a[n_] := n + Times @@ f @@@ FactorInteger[n]; a[0] = 0; Array[a, 100, 0] (* Amiram Eldar, Apr 28 2023 *)
  • PARI
    a(n) = n + sum(k=1, n, gcd(n,k)); \\ Michel Marcus, Jan 05 2018
    
  • SageMath
    def A209295(n): return sum((n/k+1)*euler_phi(k) for k in (1..n) if (k).divides(n))
    [A209295(n) for n in range(41)] # G. C. Greubel, Jun 24 2024

Formula

a(0) = 0; a(n) = A018804(n) + n for n > 0. [Amended by Georg Fischer, Jan 25 2020]
a(n) = Sum_{d|n} phi(d)*(n/d + 1) for n >= 1. - Peter Luschny, Aug 25 2019

A082022 In the following square array a(i,j) = Least Common Multiple of i and j. Sequence contains the product of the terms of the n-th antidiagonal.

Original entry on oeis.org

1, 4, 18, 576, 1200, 518400, 1587600, 180633600, 1646023680, 13168189440000, 461039040000, 229442532802560000, 86553098311680000, 3753113311877529600, 834966920275488000000
Offset: 1

Views

Author

Amarnath Murthy, Apr 06 2003

Keywords

Comments

If n is even and n+1 is prime, a(n) = n^2 * (n-1)!^2. If n is odd and >3, 2*(n+1)*a(n) is a perfect square, the root of which has the factor 1/2*n*(n-1)*((n-1)/2)!. This was proved by Lawrence Sze. - Ralf Stephan, Nov 16 2004

Examples

			1 2 3 4 5...
2 2 6 4 10...
3 6 3 12 15...
4 4 12 4 20...
5 10 15 20 5...
...
The same array in triangular form is
1
2 2
3 2 3
4 6 6 4
5 4 3 4 5
...
Sequence contains the product of the terms of the n-th row.
		

Crossrefs

Equals A001044(n) / A051190(n+1).

Programs

  • PARI
    for(n=1,20,p=1:for(k=1,n,p=p*lcm(k,n+1-k)):print1(p","))

Formula

Prod(k=1...n, lcm(k, n+1-k)).

Extensions

Corrected and extended by Ralf Stephan, Apr 08 2003

A338798 a(n) = Sum_{k=1..n-1} lcm(lcm(n, k), lcm(n, n-k)).

Original entry on oeis.org

0, 2, 12, 28, 100, 90, 392, 408, 792, 810, 2420, 1356, 4732, 3346, 4560, 6320, 13872, 7506, 21660, 12140, 18900, 21802, 46552, 22008, 53000, 43290, 61668, 49980, 117740, 48450, 153760, 100192, 123552, 129506, 169260, 111420, 312132, 203642, 245544, 195640
Offset: 1

Views

Author

Sebastian Karlsson, Jan 18 2021

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := Sum[LCM[LCM[n, k], LCM[n, n - k]], {k, 1, n - 1}];
    Table[a[n], {n, 1, 40}] (* Robert P. P. McKone, Jan 18 2021 *)
  • PARI
    a(n) = sum(k=1, n-1, lcm(lcm(n, k), lcm(n, n-k))); \\ Michel Marcus, Jan 18 2021
  • Python
    from math import gcd
    for n in range(1, 41):
        print(n*sum([k*(n-k)//(gcd(n,k)**2) for k in range(1, n)]), end=', ')
    

Formula

a(n) = n*Sum_{k=1..n-1} k*(n-k)/gcd(n,k)^2.
a(n) = (1/6)*n*Sum_{d|n} d*(d*phi(d) - A023900(d)).
a(p^e) = (1/6)*p^(e+1)*(p^e-1)*(p^(e+1) + p^(2*e+1) + p^2 + 2*p + 1)/(p^2 + p + 1).
a(prime(n)) = A138421(n). - Michel Marcus, Jan 20 2021
Showing 1-5 of 5 results.