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

A368736 a(n) = Sum_{k = 1..n} gcd(2*k+1, n).

Original entry on oeis.org

1, 2, 5, 4, 9, 10, 13, 8, 21, 18, 21, 20, 25, 26, 45, 16, 33, 42, 37, 36, 65, 42, 45, 40, 65, 50, 81, 52, 57, 90, 61, 32, 105, 66, 117, 84, 73, 74, 125, 72, 81, 130, 85, 84, 189, 90, 93, 80, 133, 130, 165, 100, 105, 162, 189, 104, 185, 114, 117, 180, 121, 122, 273, 64, 225, 210, 133, 132, 225, 234
Offset: 1

Views

Author

Peter Bala, Jan 04 2024

Keywords

Crossrefs

Programs

  • Maple
    seq(add(gcd(2*k+1, n), k = 1..n), n = 1..70);
    # alternative faster program for large n
    with(numtheory): seq(add(irem(d,2)*phi(d)*n/d, d in divisors(n)), n = 1..70);
  • Mathematica
    Table[Sum[GCD[2*k + 1, n], {k, 1, n}], {n, 1, 100}] (* Vaclav Kotesovec, Jan 11 2024 *)
  • PARI
    a(n) = sum(k = 1, n, gcd(2*k+1, n)); \\ Michel Marcus, Jan 11 2024

Formula

a(2*n) = 2*a(n); a(2*n+1) = A018804(2*n+1) = A344372(2*n+1).
a(n) = Sum_{k = 1..n} gcd(4*k+1, n) = Sum_{k = 1..n} gcd(4*k+3, n).
a(n) = Sum_{d divides n} X(d)*phi(d)*n/d, where phi(n) = A000010(n) and X(n) = 1 if n is odd, else 0, that is, X(n) is the principal Dirichlet character of the reduced residue system mod 2. See A000035.
Multiplicative: a(2^k) = 2^k and for odd prime p, a(p^e) = (e + 1)*p^e - e*p^(e-1).
Dirichlet g.f.: (1 - 2/2^s)/(1 - 1/2^s) * zeta(s-1)^2/zeta(s).
Sum_{k=1..n} a(k) ~ n^2*(2*log(n) - 1 + 4*gamma + 4*log(2)/3 - 12*zeta'(2)/Pi^2) / Pi^2, where gamma is the Euler-Mascheroni constant A001620. - Vaclav Kotesovec, Jan 11 2024

A368737 a(n) = Sum_{k = 1..n} gcd(3*k, n).

Original entry on oeis.org

1, 3, 9, 8, 9, 27, 13, 20, 45, 27, 21, 72, 25, 39, 81, 48, 33, 135, 37, 72, 117, 63, 45, 180, 65, 75, 189, 104, 57, 243, 61, 112, 189, 99, 117, 360, 73, 111, 225, 180, 81, 351, 85, 168, 405, 135, 93, 432, 133, 195, 297, 200, 105, 567, 189, 260, 333, 171, 117, 648, 121, 183, 585, 256, 225, 567, 133, 264, 405, 351
Offset: 1

Views

Author

Peter Bala, Jan 05 2024

Keywords

Comments

a(n) equals the number of solutions to the congruence 3*x*y == 0 (mod n) for 1 <= x, y <= n.

Examples

			a(6) = 27: each of the 36 pairs (x, y), 1 <= x, y <= 6, is a solution to the congruence 3*x*y == 0 (mod 6) except for the 9 pairs (x, y) with both x and y odd.
		

Crossrefs

Programs

  • Maple
    seq(add(gcd(3*k, n), k = 1..n), n = 1..70);
    # alternative faster program for large n
    with(numtheory): seq(add(gcd(3,d)*phi(d)*n/d, d in divisors(n)), n = 1..70);
  • Mathematica
    Table[Sum[GCD[3*k, n], {k, 1, n}], {n, 1, 100}] (* Vaclav Kotesovec, Jan 11 2024 *)
  • PARI
    a(n) = sum(k = 1, n, gcd(3*k, n)); \\ Michel Marcus, Jan 11 2024

Formula

a(3*n) = 9*A018804(n); a(3*n+1) = A018804(3*n+1); a(3*n+2) = A018804(3*n+2).
a(n) = Sum_{d divides n} gcd(3, d)*phi(d)*n/d, where phi(n) = A000010(n)
Multiplicative: a(3^k) = (2*k + 1)*3^k and for prime p not equal to 3, a(p^k) = (k + 1)*p^k - k*p^(k-1).
Define D(n) = Sum_{d divides n} a(d). Then
D(3*n+1) = (3*n + 1)*tau(3*n+1) and D(3*n+2) = (3*n + 2)*tau(3*n+2), where tau(n) = A000005(n), the number of divisors of n.
The sequence {(1/9)*( D(3*n) - D(n) ) : n >= 1} begins {1, 4, 5, 12, 10, 20, 14, 32, 21, 40, 22, 60, 26, 56, 50, 80, 34, 84, 38, 120, 70, 88, ...} and appears to be multiplicative.
Dirichlet g.f.: (1 + 3/3^s)/(1 - 1/3^s) * zeta(s-1)^2/zeta(s).
Sum_{k=1..n} a(k) ~ 9*n^2 * (log(n)/2 - 1/4 + gamma - 3*log(3)/16 - 3*zeta'(2)/Pi^2) / Pi^2, where gamma is the Euler-Mascheroni constant A001620. - Vaclav Kotesovec, Jan 11 2024

A368741 a(n) = Sum_{k = 1..n} gcd(5*k + 1, n).

Original entry on oeis.org

1, 3, 5, 8, 5, 15, 13, 20, 21, 15, 21, 40, 25, 39, 25, 48, 33, 63, 37, 40, 65, 63, 45, 100, 25, 75, 81, 104, 57, 75, 61, 112, 105, 99, 65, 168, 73, 111, 125, 100, 81, 195, 85, 168, 105, 135, 93, 240, 133, 75, 165, 200, 105, 243, 105, 260, 185, 171, 117, 200, 121, 183, 273, 256, 125, 315, 133, 264, 225, 195
Offset: 1

Views

Author

Peter Bala, Jan 08 2024

Keywords

Crossrefs

Programs

  • Maple
    with(numtheory): seq(add(gcd(5*k+1, n), k = 1..n), n = 1..70);
    # alternative faster program for large n
    with(numtheory): seq(add(irem(d^4,5)*phi(d)*n/d, d in divisors(n)), n = 1..70);
  • Mathematica
    Table[Sum[GCD[5*k+1, n], {k, 1, n}], {n, 1, 100}] (* Vaclav Kotesovec, Jan 12 2024 *)

Formula

a(n) = Sum_{k = 1..n} gcd(5*k + r, n) for 1 <= r <= 4.
a(5*n) = 5*a(n); a(5*n+r) = A018804(5*n+r) for 1 <= r <= 4.
a(n) = Sum_{d divides n} X(d)*phi(d)*n/d, where phi(n) = A000010(n) and X(n) = A011558(n) is the principal Dirichlet character of the reduced residue system mod 5.
Multiplicative: a(5^k) = 5^k and for prime p not equal to 5, a(p^k) = (k + 1)*p^k - k*p^(k-1).
Dirichlet g.f.: (1 - 5/5^s)/(1 - 1/5^s) * zeta(s-1)^2/zeta(s).
Sum_{k=1..n} a(k) ~ 5*n^2 * (log(n)/2 - 1/4 + gamma + 5*log(5)/48 - 3*zeta'(2)/Pi^2) / Pi^2, where gamma is the Euler-Mascheroni constant A001620. - Vaclav Kotesovec, Jan 12 2024

A368738 a(n) = Sum_{k = 1..n} gcd(3*k + 1, n).

Original entry on oeis.org

1, 3, 3, 8, 9, 9, 13, 20, 9, 27, 21, 24, 25, 39, 27, 48, 33, 27, 37, 72, 39, 63, 45, 60, 65, 75, 27, 104, 57, 81, 61, 112, 63, 99, 117, 72, 73, 111, 75, 180, 81, 117, 85, 168, 81, 135, 93, 144, 133, 195, 99, 200, 105, 81, 189, 260, 111, 171, 117, 216, 121, 183, 117, 256, 225, 189, 133, 264, 135, 351
Offset: 1

Views

Author

Peter Bala, Jan 05 2024

Keywords

Crossrefs

Programs

  • Maple
    seq(add(gcd(3*k+1, n), k = 1..n), n = 1..70);
    # alternative faster program for large n
    with(numtheory): seq(add(irem(d^2,3)*phi(d)*n/d, d in divisors(n)), n = 1..70);
  • Mathematica
    Table[Sum[GCD[3*k+1, n], {k, 1, n}], {n, 1, 100}] (* Vaclav Kotesovec, Jan 12 2024 *)

Formula

a(n) = Sum_{k = 1..n} gcd(3*k + 2, n).
a(n) = Sum_{k = 1..n} gcd(9*k + r) for r = 1, 2, 4, 5, 7 and 8.
a(3*n) = 3*a(n); a(3*n+1) = A018804(3*n+1); a(3*n+2) = A018804(3*n+2).
a(n) = Sum_{d divides n} X(d)*phi(d)*n/d, where phi(n) = A000010(n) and X(n) = A011655(n) is the principal Dirichlet character of the reduced residue system mod 3.
Multiplicative: a(3^k) = 3^k and for prime p not equal to 3, a(p^k) = (k + 1)*p^k - k*p^(k-1).
Dirichlet g.f.: (1 - 3/3^s)/(1 - 1/3^s) * zeta(s-1)^2/zeta(s).
Sum_{k=1..n} a(k) ~ 9*n^2 * (log(n)/2 - 1/4 + gamma + 3*log(3)/16 - 3*zeta'(2)/Pi^2) / (2*Pi^2), where gamma is the Euler-Mascheroni constant A001620. - Vaclav Kotesovec, Jan 12 2024

A368739 a(n) = Sum_{k = 1..n} gcd(4*k, n).

Original entry on oeis.org

1, 4, 5, 16, 9, 20, 13, 48, 21, 36, 21, 80, 25, 52, 45, 128, 33, 84, 37, 144, 65, 84, 45, 240, 65, 100, 81, 208, 57, 180, 61, 320, 105, 132, 117, 336, 73, 148, 125, 432, 81, 260, 85, 336, 189, 180, 93, 640, 133, 260, 165, 400, 105, 324, 189, 624, 185, 228, 117, 720, 121, 244, 273, 768
Offset: 1

Views

Author

Peter Bala, Jan 07 2024

Keywords

Crossrefs

Programs

  • Maple
    seq(add(gcd(4*k, n), k = 1..n), n = 1..70);
    # alternative faster program for large n
    with(numtheory): seq(add(gcd(4,d)*phi(d)*n/d, d in divisors(n)), n = 1..70);
  • Mathematica
    Table[Sum[GCD[4*k, n], {k, 1, n}], {n, 1, 100}] (* Vaclav Kotesovec, Jan 12 2024 *)

Formula

a(4*n) = 16*A018804(n); a(4*n+2) = 4*A018804(2*n+1); a(4*n+r) = A018804(4*n+r) for r = 1 and 3.
a(n) = Sum_{d divides n} gcd(4, d)*phi(d)*n/d, where phi(n) = A000010(n)
Multiplicative: a(2^k) = k*2^(k+1) for k >= 1; for odd prime p, a(p^k) = (k + 1)*p^k - k*p^(k-1).
Define D(n) = Sum_{d divides n} a(d). Then
D(4*n+r) = (4*n + r)*tau(4*n+r) for r = 1 and r = 3, where tau(n) = A000005(n), the number of divisors of n.
D(4*n+2) = (5/4)*(4*n + 2)*tau(4*n+2).
The sequence defined for n >= 1 by u(n) = (1/4)*( D(4*n) - D(n) ) begins {5, 16, 30, 44, 50, 96, 70, 112, 135, 160, 110, 264, 130, 224, 300, 272, 170, 432, 190, 440, 420, 352, ...} and appears to be multiplicative: that is, u(1)*u(n*m) = u(n)*u(m) for n and m coprime.
Dirichlet g.f.: (1 + 4/4^s)/(1 - 1/2^s) * zeta(s-1)^2/zeta(s).
Sum_{k=1..n} a(k) ~ n^2 * (5*log(n) - 5/2 + 10*gamma - 11*log(2)/3 - 30*zeta'(2)/Pi^2) / Pi^2, where gamma is the Euler-Mascheroni constant A001620. - Vaclav Kotesovec, Jan 12 2024

A368740 a(n) = Sum_{k = 1..n} gcd(5*k, n).

Original entry on oeis.org

1, 3, 5, 8, 25, 15, 13, 20, 21, 75, 21, 40, 25, 39, 125, 48, 33, 63, 37, 200, 65, 63, 45, 100, 225, 75, 81, 104, 57, 375, 61, 112, 105, 99, 325, 168, 73, 111, 125, 500, 81, 195, 85, 168, 525, 135, 93, 240, 133, 675, 165, 200, 105, 243, 525, 260, 185, 171, 117, 1000, 121, 183, 273, 256, 625
Offset: 1

Views

Author

Peter Bala, Jan 07 2024

Keywords

Comments

a(n) equals the number of solutions to the congruence 5*x*y == 0 (mod n) for 1 <= x, y <= n.

Examples

			a(10) = 75: each of the 100 pairs (x, y), 1 <= x, y <= 10, is a solution to the congruence 5*x*y == 0 (mod 10) except for the 25 pairs (x, y) with both x and y odd.
		

Crossrefs

Programs

  • Maple
    seq(add(gcd(5*k, n), k = 1..n), n = 1..70);
    # alternative faster program for large n
    with(numtheory): seq(add(gcd(5,d)*phi(d)*n/d, d in divisors(n)), n = 1..70);
  • Mathematica
    Table[Sum[GCD[5*k, n], {k, 1, n}], {n, 1, 100}] (* Vaclav Kotesovec, Jan 12 2024 *)

Formula

a(5*n) = 25*A018804(n); a(5*n+r) = A018804(5*n+r) for 1 <= r <= 4.
a(n) = Sum_{d divides n} gcd(5, d)*phi(d)*n/d, where phi(n) = A000010(n).
Multiplicative: a(5^k) = (4*k + 1)*5^k and for prime p not equal to 5, a(p^k) = (k + 1)*p^k - k*p^(k-1).
Define D(n) = Sum_{d divides n} a(d). Then
D(5*n+r) = (5*n + r)*tau(5*n+r) for 1 <= r <= 4, where tau(n) = A000005(n), the number of divisors of n.
The sequence {(1/25)*( D(5*n) - D(n) ) : n >= 1} begins {1, 4, 6, 12, 9, 24, 14, 32, 27, 36, 22, 72, 26, 56, 54, 80, 34, 108, 38, 108, 84, 88, ...} and appears to be multiplicative.
Dirichlet g.f.: (1 + 15/5^s)/(1 - 1/5^s) * zeta(s-1)^2/zeta(s).
Sum_{k=1..n} a(k) ~ n^2 * (5*log(n) - 5/2 + 10*gamma - 25*log(5)/12 - 30*zeta'(2)/Pi^2) / Pi^2, where gamma is the Euler-Mascheroni constant A001620. - Vaclav Kotesovec, Jan 12 2024
Showing 1-6 of 6 results.