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

A226455 G.f.: exp( Sum_{n>=1} A056789(n)*x^n/n ), where A056789(n) = Sum_{k=1..n} lcm(k,n)/gcd(k,n).

Original entry on oeis.org

1, 1, 2, 5, 10, 23, 40, 86, 159, 300, 559, 1037, 1887, 3400, 6102, 10763, 19027, 33138, 57621, 99160, 169934, 289432, 490208, 826169, 1385272, 2312155, 3840729, 6354981, 10467872, 17179510, 28081845, 45740041, 74234336, 120074489, 193582842, 311102311, 498434393
Offset: 0

Views

Author

Paul D. Hanna, Jun 07 2013

Keywords

Examples

			G.f.: A(x) = 1 + x + 2*x^2 + 5*x^3 + 10*x^4 + 23*x^5 + 40*x^6 + 86*x^7 + ...
where
log(A(x)) = x + 3*x^2/2 + 10*x^3/3 + 19*x^4/4 + 51*x^5/5 + 48*x^6/6 + 148*x^7/7 + 147*x^8/8 + 253*x^9/9 + 253*x^10/10 + ... + A056789(n)*x^n/n + ...
		

Crossrefs

Programs

  • Mathematica
    nmax = 50; CoefficientList[Series[1/Sqrt[1-x] * Product[1/(1 - x^k)^(k*EulerPhi[k]/2), {k, 1, nmax}], {x, 0, nmax}], x] (* Vaclav Kotesovec, Oct 28 2024 *)
  • PARI
    {A056789(n)=sum(k=1,n,lcm(n,k)/gcd(n,k))}
    {a(n)=polcoeff(exp(sum(m=1,n+1,A056789(m)*x^m/m)+x*O(x^n)),n)}
    for(n=0,30,print1(a(n),", "))

Formula

G.f.: (1/(1 - x)) * Product_{k>=2} 1/(1 - x^k)^(phi(k^2)/2), where phi() is the Euler totient function. - Ilya Gutkovskiy, May 28 2019
a(n) ~ exp(4*sqrt(Pi)*n^(3/4)/(3*5^(1/4)) + 3*zeta(3)/(2*Pi^2)) / (2^(3/2)*sqrt(Pi*n)). - Vaclav Kotesovec, Oct 28 2024

A068963 a(n) = Sum_{d|n} phi(d^3).

Original entry on oeis.org

1, 5, 19, 37, 101, 95, 295, 293, 505, 505, 1211, 703, 2029, 1475, 1919, 2341, 4625, 2525, 6499, 3737, 5605, 6055, 11639, 5567, 12601, 10145, 13627, 10915, 23549, 9595, 28831, 18725, 23009, 23125, 29795, 18685, 49285, 32495, 38551, 29593
Offset: 1

Views

Author

Benoit Cloitre, Apr 06 2002

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Total[EulerPhi[Divisors[n]^3]],{n,50}] (* Harvey P. Dale, Feb 24 2013 *)
    f[p_, e_] := p^2*(p - 1)*(p^(3 e) - 1)/(p^3 - 1) + 1; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 40] (* Amiram Eldar, Jun 19 2022 *)
  • PARI
    a(n) = sumdiv(n, d, eulerphi(d^3)); \\ Michel Marcus, Mar 10 2018

Formula

Also Sum_{d|n} d*phi(d^2), or Sum_{d|n} d^2*phi(d).
Also Sum_{k=1..n} (n/gcd(n, k))^2 = Sum_{k=1..n} (lcm(n, k)/k)^2. - Vladeta Jovovic, Dec 29 2002
Multiplicative with a(p^e) = 1 + p^2 * (p-1)*(p^(3e)-1)/(p^3-1).
G.f.: Sum_{k>=1} k^2*phi(k)*x^k/(1 - x^k). - Ilya Gutkovskiy, Mar 10 2018
Dirichlet g.f.: Sum_{n>=1} a(n) / n^s = zeta(s) * zeta(s-3) / zeta(s-2). - Werner Schulte, Feb 18 2021
Sum_{k=1..n} a(k) ~ Pi^2 * n^4 / 60. - Vaclav Kotesovec, Aug 20 2021

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

A127553 a(n) = Product_{k=1..n} lcm(k,n)/gcd(k,n).

Original entry on oeis.org

1, 2, 18, 96, 15000, 6480, 84707280, 41287680, 21427701120, 56700000000, 94121726392108800, 2483144294400, 11159820050604594969600, 24625709514114508800, 620634514500000000000, 359450793240158011392000
Offset: 1

Views

Author

Leroy Quet, Apr 02 2007

Keywords

Examples

			a(6) = lcm(1,6)/gcd(1,6) * lcm(2,6)/gcd(2,6) * lcm(3,6)/gcd(3,6) * lcm(4,6)/gcd(4,6) * lcm(5,6)/gcd(5,6) * lcm(6,6)/gcd(6,6) = 6/1 * 6/2 * 6/3 * 12/2 * 30/1 * 6/6 = 6480.
		

Crossrefs

Cf. A056789.

Programs

  • Maple
    A067911 := proc(n) mul( gcd(k,n),k=1..n) ; end: A071248 := proc(n) mul( lcm(k,n),k=1..n) ; end: A127553 := proc(n) A071248(n)/A067911(n) ; end: for n from 1 to 30 do printf("%d, ",A127553(n)) ; od ; # R. J. Mathar, Apr 03 2007
    a:=n->product(ilcm(k,n)/igcd(k,n),k=1..n): seq(a(n),n=1..18); # Emeric Deutsch, Apr 13 2007
  • Mathematica
    Table[Product[LCM[k,n]/GCD[k,n],{k,n}],{n,20}] (* Harvey P. Dale, Jun 10 2017 *)

Formula

a(n) = A071248(n)/A067911(n). - R. J. Mathar, Apr 03 2007

Extensions

More terms from R. J. Mathar, Apr 03 2007

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

Original entry on oeis.org

0, 1, 1, 3, 1, 6, 1, 11, 10, 13, 1, 28, 1, 24, 30, 51, 1, 57, 1, 89, 52, 58, 1, 120, 51, 81, 91, 166, 1, 148, 1, 211, 120, 139, 128, 307, 1, 174, 166, 357, 1, 363, 1, 404, 348, 256, 1, 544, 148, 403, 282, 565, 1, 588, 271, 714, 352, 409, 1, 822, 1, 468, 652, 915
Offset: 1

Views

Author

Sebastian Karlsson, Dec 02 2020

Keywords

Crossrefs

Programs

  • Maple
    a:= n-> add(irem(n*k/igcd(n, k)^2, n), k=1..n):
    seq(a(n), n=1..80);  # Alois P. Heinz, Dec 03 2020
  • Mathematica
    a[n_] := Sum[Mod[LCM[n, k]/GCD[n, k], n], {k, 1, n}]; Array[a, 100] (* Amiram Eldar, Dec 03 2020 *)
  • PARI
    a(n) = sum(k=1, n, lcm(n,k)/gcd(n,k) % n); \\ Michel Marcus, Dec 02 2020

Formula

a(n) = A056789(n) - n * Sum_{k=1..n} (floor(k / gcd(n,k)^2)).
a(p^2) = A056789(p) for prime number p.
a(n) = 0 iff n = 1.
a(n) = 1 iff n is a prime.
a(p^2) = 1 + p^2(p-1)/2, if p is a prime. Sketch of proof: for an arbitrary term "lcm(n,k)/gcd(n,k) mod n", this is clearly 0 if n and k are relatively prime. If it isn't 0, then k = p*r < n for 1 <= r < p or k = n. Hence, a(p^2) = 1 + p*Sum_{r=1..p-1} r. Hence, a(p^2) = 1 + p^2*(p-1)/2.
If p is a prime then:
a(p^(2*n)) = 1 + (1/2)*p^2*(p-1)*((p^(3*n)-1)/(p^3-1)+p^(3n-2)*(p^(n-1)-1)/(p-1))
a(p^(2*n+1)) = 1 + (1/2)*p^2*(p-1)*((p^(3*n)-1)/(p^3-1)+p^(3n-1)*(p^n-1)/(p-1))
See links for proof.

A332618 a(n) = Sum_{d|n} lcm(d, n/d) / gcd(d, n/d).

Original entry on oeis.org

1, 4, 6, 9, 10, 24, 14, 20, 19, 40, 22, 54, 26, 56, 60, 41, 34, 76, 38, 90, 84, 88, 46, 120, 51, 104, 60, 126, 58, 240, 62, 84, 132, 136, 140, 171, 74, 152, 156, 200, 82, 336, 86, 198, 190, 184, 94, 246, 99, 204, 204, 234, 106, 240, 220, 280, 228, 232, 118, 540
Offset: 1

Views

Author

Ilya Gutkovskiy, Feb 17 2020

Keywords

Crossrefs

Programs

  • Maple
    a:= n-> n*add(1/igcd(d, n/d)^2, d=numtheory[divisors](n)):
    seq(a(n), n=1..80);  # Alois P. Heinz, Feb 17 2020
  • Mathematica
    Table[Sum[LCM[d, n/d]/GCD[d, n/d], {d, Divisors[n]}], {n, 1, 60}]
    f[p_, e_] := If[EvenQ[e], (2*p^(e+2) - p^2 - 1)/(p^2 - 1), 2*(p^(e+2) - p)/(p^2 - 1)]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Dec 05 2022 *)
  • PARI
    A332618(n) = sumdiv(n,d,lcm(d,n/d)/gcd(d,n/d)); \\ Antti Karttunen, Nov 12 2021

Formula

a(n) = n * Sum_{d|n} 1 / gcd(d, n/d)^2.
Multiplicative with a(p^e) = (2*p^(e+2) - p^2 - 1)/(p^2 - 1) if e is even, a(p^e) = 2*(p^(e+2) - p)/(p^2 - 1) if e is odd. - Sebastian Karlsson, May 07 2022
From Peter Bala, Jan 24 2024: (Start)
a(n) = Sum_{d divides n} A007913(d)*n/d.
Dirichlet g.f.: zeta(2*s)*zeta(s-1)^2/zeta(2*s-2). (End)

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

Original entry on oeis.org

0, 1, 1, 1, 1, 6, 1, 3, 1, 13, 1, 16, 1, 24, 30, 3, 1, 39, 1, 29, 31, 58, 1, 72, 1, 81, 10, 82, 1, 148, 1, 19, 120, 139, 93, 55, 1, 174, 88, 157, 1, 279, 1, 184, 168, 256, 1, 160, 1, 303, 282, 97, 1, 372, 106, 266, 181, 409, 1, 582, 1, 468, 211, 19, 285, 763, 1
Offset: 1

Views

Author

Sebastian Karlsson, Dec 02 2020

Keywords

Comments

n divides a(n) iff n divides A339384(n) iff n divides A056789(n). For proof, consider the formulas for a(n) and A339384(n).
Conjecture: If a(n) = A339384(n), then n is squarefree. This appears to be true for at least the first 2000 terms.
If n is a squarefree semiprime (A006881), then a(n) = A339384(n) iff the smaller prime factor of n divides its larger prime factor + 1.

Crossrefs

Programs

  • Maple
    a:= n-> add(irem(n*k/igcd(n, k)^2, k), k=1..n):
    seq(a(n), n=1..80);  # Alois P. Heinz, Dec 03 2020
  • Mathematica
    Table[Sum[Mod[LCM[n,k]/GCD[n,k],k],{k,n}],{n,67}] (* Stefano Spezia, Dec 02 2020 *)
  • PARI
    a(n) = sum(k=1, n, n*k/gcd(n, k)^2 % k); \\ Michel Marcus, Dec 09 2020

Formula

a(p) = a(p^2) = 1 for prime p.
If n>4, then a(n) = A056789(n) - n * Sum_{k=1..floor(n/2)} floor(n/(gcd(n,k)^2)). For proof, just rewrite "mod" in terms of the floor-function, use the formulas lcm(n,k)*gcd(n,k) = n*k and gcd(n, k) = gcd(n, n-k) and split the sum into two equal parts.
If p is a prime and p>2, then a(2*p) = A339384(2*p) = 3 + p*(p-1)/2.
If p is prime then a(p^(2*n)) = a(p^(2*n-1)) = 1 + (1/2)*p^2*(p-1)*(p^(3*n-3)-1)/(p^3-1). In particular, a(p^(2*n+2)) = a(p^(2*n+1)) = A056789(p^n). This can be proved in a very similar fashion as the corresponding formulas of A339384(p^n) and A056789(p^n).

Extensions

More terms from Stefano Spezia, Dec 02 2020

A332658 a(n) = Sum_{k=1..n} mu(gcd(n, k)) * lcm(n, k) / gcd(n, k).

Original entry on oeis.org

1, 1, 8, 14, 49, 26, 146, 112, 234, 149, 604, 238, 1013, 440, 842, 896, 2311, 702, 3248, 1386, 2491, 1814, 5818, 1904, 6200, 3041, 6318, 4102, 11773, 2524, 14414, 7168, 10277, 6935, 14504, 6552, 24641, 9746, 17230, 11088, 33619, 7471, 38828, 16926, 23166, 17456
Offset: 1

Views

Author

Ilya Gutkovskiy, Feb 18 2020

Keywords

Crossrefs

Programs

  • Magma
    [&+[MoebiusMu(Gcd(n,k))*Lcm(n,k)/ Gcd(n,k):k in [1..n]]:n in [1..50]]; // Marius A. Burtea, Feb 18 2020
    
  • Mathematica
    Table[Sum[MoebiusMu[GCD[n, k]] LCM[n, k]/GCD[n, k], {k, 1, n}], {n, 1, 46}]
    A007427[n_] := Sum[MoebiusMu[n/d] MoebiusMu[d], {d, Divisors[n]}]; A056789[n_] := Sum[LCM[n, k]/GCD[n, k], {k, 1, n}]; Table[Sum[A007427[n/d] A056789[d], {d, Divisors[n]}], {n, 1, 46}]
  • PARI
    a(n) = sum(k=1, n, moebius(gcd(n, k))*lcm(n, k)/gcd(n, k)); \\ Michel Marcus, Feb 18 2020

Formula

a(n) = Sum_{d|n} A007427(n/d) * A056789(d).

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