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 12 results. Next

A216622 Square array read by antidiagonals: T(n,k) = Sum_{c|n, d|k} phi(lcm(c,d)) for n >= 1, k >= 1.

Original entry on oeis.org

1, 2, 2, 3, 4, 3, 4, 6, 6, 4, 5, 8, 7, 8, 5, 6, 10, 12, 12, 10, 6, 7, 12, 15, 14, 15, 12, 7, 8, 14, 14, 20, 20, 14, 14, 8, 9, 16, 21, 24, 13, 24, 21, 16, 9, 10, 18, 24, 28, 30, 30, 28, 24, 18, 10, 11, 20, 19, 26, 35, 28, 35, 26, 19, 20, 11, 12, 22, 30, 36, 40
Offset: 1

Views

Author

Peter Luschny, Sep 12 2012

Keywords

Comments

T(n,n) = A062380(n) = Sum_{d|n} phi(d)*tau(d^2).
T(n,1) = T(1,n) = A000027(n) = n.
T(n,2) = T(2,n) = A005843(n) = 2*n.
T(n+1,n) = A002378(n) = (n+1)*n.
T(prime(n),1) = A000040(n) = prime(n).
T(prime(n),prime(n)) = 3*prime(n)-2.

Examples

			[-----1---2---3---4---5---6---7---8---9---10---11---12]
[ 1]  1,  2,  3,  4,  5,  6,  7,  8,  9,  10,  11,  12
[ 2]  2,  4,  6,  8, 10, 12, 14, 16, 18,  20,  22,  24
[ 3]  3,  6,  7, 12, 15, 14, 21, 24, 19,  30,  33,  28
[ 4]  4,  8, 12, 14, 20, 24, 28, 26, 36,  40,  44,  42
[ 5]  5, 10, 15, 20, 13, 30, 35, 40, 45,  26,  55,  60
[ 6]  6, 12, 14, 24, 30, 28, 42, 48, 38,  60,  66,  56
[ 7]  7, 14, 21, 28, 35, 42, 19, 56, 63,  70,  77,  84
[ 8]  8, 16, 24, 26, 40, 48, 56, 42, 72,  80,  88,  78
[ 9]  9, 18, 19, 36, 45, 38, 63, 72, 37,  90,  99,  76
[10] 10, 20, 30, 40, 26, 60, 70, 80, 90,  52, 110, 120
[11] 11, 22, 33, 44, 55, 66, 77, 88, 99, 110,  31, 132
[12] 12, 24, 28, 42, 60, 56, 84, 78, 76, 120, 132,  98
.
Displayed as a triangular array:
   1,
   2,  2,
   3,  4,  3,
   4,  6,  6,  4,
   5,  8,  7,  8,  5,
   6, 10, 12, 12, 10,  6,
   7, 12, 15, 14, 15, 12,  7,
   8, 14, 14, 20, 20, 14, 14,  8,
   9, 16, 21, 24, 13, 24, 21, 16,  9,
		

Crossrefs

Programs

  • Maple
    with(numtheory):
    T:= (n, k)-> add(add(phi(ilcm(c, d)), c=divisors(n)), d=divisors(k)):
    seq (seq (T(n, 1+d-n), n=1..d), d=1..14);  # Alois P. Heinz, Sep 12 2012
  • Mathematica
    t[n_, k_] := Sum[ EulerPhi[LCM[c, d]], {c, Divisors[n]}, {d, Divisors[k]}]; Table[ t[n-k+1, k], {n, 1, 12}, {k, 1, n}] // Flatten (* Jean-François Alcover, Jun 28 2013 *)
  • Sage
    def A216622(n, k) :
        cp = cartesian_product([divisors(n), divisors(k)])
        return reduce(lambda x,y: x+y, map(euler_phi, map(lcm, cp)))
    for n in (1..12): [A216622(n,k) for k in (1..12)]

A216623 Triangle read by rows, n>=1, 1<=k<=n, T(n,k) = Sum_{c|n,d|k} phi(lcm(c,d)).

Original entry on oeis.org

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

Views

Author

Peter Luschny, Sep 12 2012

Keywords

Comments

This is the lower triangular array of A216622, which is the main entry for this sequence.
T(n,1) = A000027(n).
T(n,n) = A062380(n).

Examples

			The first rows of the triangle are:
1,
2,  4,
3,  6,  7,
4,  8, 12, 14,
5, 10, 15, 20, 13,
6, 12, 14, 24, 30, 28,
7, 14, 21, 28, 35, 42, 19,
8, 16, 24, 26, 40, 48, 56, 42,
9, 18, 19, 36, 45, 38, 63, 72, 37,
		

Crossrefs

Programs

  • Maple
    with(numtheory):
    T:= (n, k)-> add(add(phi(ilcm(c, d)), c=divisors(n)), d=divisors(k)):
    seq (seq (T(n, k), k=1..n), n=1..14);  # Alois P. Heinz, Sep 12 2012
  • Mathematica
    t[n_, k_] := Sum[ EulerPhi[ LCM[c, d]], {c, Divisors[n]}, {d, Divisors[k]}]; Table[t[n, k], {n, 1, 12}, {k, 1, n}] // Flatten (* Jean-François Alcover, Jul 23 2013 *)
  • Sage
    # uses[A216622]
    for n in (1..9): [A216622(n,k) for k in (1..n)]

A064950 a(n) = Sum_{i|n, j|n} lcm(i,j).

Original entry on oeis.org

1, 7, 10, 27, 16, 70, 22, 83, 55, 112, 34, 270, 40, 154, 160, 227, 52, 385, 58, 432, 220, 238, 70, 830, 141, 280, 244, 594, 88, 1120, 94, 579, 340, 364, 352, 1485, 112, 406, 400, 1328, 124, 1540, 130, 918, 880, 490, 142, 2270, 267, 987, 520, 1080, 160, 1708
Offset: 1

Views

Author

Vladeta Jovovic, Oct 28 2001

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_]:= Sum[LCM[i,j], {i, Divisors[n]}, {j, Divisors[n]}];
    Array[a,60] (* Jean-François Alcover, Jun 03 2019 *)
    f[p_, e_] := (p^(e+2) - 3*p^(e+1) + p + 1 + 2*p^(e+2)*e - 2*p^(e+1)*e)/(p-1)^2; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 60] (* Amiram Eldar, Aug 28 2023 *)
  • PARI
    for (n=1, 1000, d=divisors(n); a=sum(i=1, length(d), numdiv(d[i]^2)*d[i]); write("b064950.txt", n, " ", a)) \\ Harry J. Smith, Oct 01 2009
    
  • Sage
    def A064950(n) :
        tau = sloane.A000005; D = divisors(n)
        return reduce(lambda x,y: x+y, [d*tau(d^2) for d in D])
    [A064950(n) for n in (1..54)] # Peter Luschny, Sep 10 2012

Formula

a(n) = Sum_{d|n} d*tau(d^2).
Multiplicative with a(p^e) = (p^(e+2) - 3*p^(e+1) + p + 1 + 2*p^(e+2)*e - 2*p^(e+1)*e)/(p-1)^2.

A062369 Dirichlet convolution of n and tau^2(n).

Original entry on oeis.org

1, 6, 7, 21, 9, 42, 11, 58, 30, 54, 15, 147, 17, 66, 63, 141, 21, 180, 23, 189, 77, 90, 27, 406, 54, 102, 106, 231, 33, 378, 35, 318, 105, 126, 99, 630, 41, 138, 119, 522, 45, 462, 47, 315, 270, 162, 51, 987, 86, 324, 147, 357, 57, 636, 135, 638, 161, 198, 63, 1323
Offset: 1

Views

Author

Vladeta Jovovic, Jul 07 2001

Keywords

Comments

Dirichlet convolution of A000027 and A035116.
Inverse Mobius transform of A060724. - R. J. Mathar, Oct 15 2011

Crossrefs

Programs

  • Magma
    [&+[d*#Divisors(Floor(n/d))^2:d in Divisors(n)]:n in [1..60]]; // Marius A. Burtea, Aug 25 2019
  • Mathematica
    a[n_] := Sum[ DivisorSigma[1, i]*DivisorSigma[1, j] / DivisorSigma[1, LCM[i, j]], {i, Divisors[n]}, {j, Divisors[n]}]; Table[a[n], {n, 1, 60}] (* Jean-François Alcover, Mar 26 2013 *)
  • PARI
    a(n) = sumdiv(n, d, d*numdiv(n/d)^2); \\ Michel Marcus, Nov 03 2018
    

Formula

a(n) = Sum_{i|n, j|n} sigma(i)*sigma(j)/sigma(lcm(i,j)), where sigma(n) = sum of divisors of n.
a(n) = Sum_{i|d, j|d} sigma(gcd(i, j));
a(n) = Sum_{d|n} d*tau(n/d)^2, where tau(n) = number of divisors of n.
Multiplicative with a(p^e) = (1-p^(3+e)-p^(2+e)+e^2+4*p^2+p^2*e^2+2*e-3*p+4*p^2*e-6*e*p-2*e^2*p)/(1-p)^3.
Dirichlet g.f.: (zeta(s))^4*zeta(s-1)/zeta(2*s). - R. J. Mathar, Feb 09 2011
G.f.: Sum_{k>=1} tau(k)^2*x^k/(1 - x^k)^2. - Ilya Gutkovskiy, Nov 02 2018
Sum_{k=1..n} a(k) ~ 5 * Pi^4 * n^2 / 144. - Vaclav Kotesovec, Jan 28 2019
a(n) = Sum_{d|n} tau(d^2)*sigma(n/d), where tau(n) = number of divisors of n, and sigma(n) = sum of divisors of n. - Ridouane Oudra, Aug 25 2019

A062368 Multiplicative with a(p^e) = (e+1)*(e+2)*(4*e+3)/6.

Original entry on oeis.org

1, 7, 7, 22, 7, 49, 7, 50, 22, 49, 7, 154, 7, 49, 49, 95, 7, 154, 7, 154, 49, 49, 7, 350, 22, 49, 50, 154, 7, 343, 7, 161, 49, 49, 49, 484, 7, 49, 49, 350, 7, 343, 7, 154, 154, 49, 7, 665, 22, 154, 49, 154, 7, 350, 49, 350, 49, 49, 7, 1078, 7, 49, 154, 252, 49, 343, 7, 154
Offset: 1

Views

Author

Vladeta Jovovic, Jul 07 2001

Keywords

Comments

Conjecture: this is the third inverse Mobius transform of the sequence 4^A001221(n). - R. J. Mathar, Aug 09 2012

Crossrefs

Programs

  • Mathematica
    f[p_, e_] := (e+1)*(e+2)*(4*e+3)/6; a[n_] := Times @@ f @@@ FactorInteger[n]; a[1] = 1; Array[a, 100] (* Amiram Eldar, Sep 05 2023 *)

Formula

a(n) = Sum_{i|n, j|n} tau(i)*tau(j)/tau(gcd(i, j)), where tau(n) = number of divisors of n, cf. A000005.
Also a(n) = Sum_{i|n, j|n} tau(lcm(i, j)).
a(n) = Sum_{d|n} tau_3(d^2) = Sum_{d|n} A007425(d^2). - Enrique Pérez Herrero, Jan 17 2013

A257984 Nonhomogeneous Beatty sequence: ceiling((n - 1/2)*Pi).

Original entry on oeis.org

2, 5, 8, 11, 15, 18, 21, 24, 27, 30, 33, 37, 40, 43, 46, 49, 52, 55, 59, 62, 65, 68, 71, 74, 77, 81, 84, 87, 90, 93, 96, 99, 103, 106, 109, 112, 115, 118, 121, 125, 128, 131, 134, 137, 140, 143, 147, 150, 153, 156, 159, 162, 165, 169, 172, 175, 178, 181, 184
Offset: 1

Views

Author

Clark Kimberling, Jun 15 2015

Keywords

Comments

Let r = Pi, s = r/(r-1), and t = 1/2. Let R be the ordered set {floor[(n + t)*r] : n is an integer} and let S be the ordered set {floor[(n - t)*s : n is an integer}; thus,
R = (..., -10, -9, -7, -6, -4, -3, -1, 0, 2, 3, 5, 6, 8, ...);
S = (..., -15, -11, -8, -5, -2, 1, 4, 7, 10, 14, 17, 20, ...).
By Fraenkel's theorem (Theorem XI in the cited paper); R and S partition the integers.
R is the set of integers n such that (cos n)*(cos(n + 1)) < 0;
S is the set of integers n such that (cos n)*(cos(n + 1)) > 0.
A246046 = (2,3,5,6,8,...), positive terms of R;
A062389 = (1,4,7,10,14,17,...), positive terms of S;
A258048 = (1,3,4,6,7,9,10,...), - (negative terms of R);
A257984 = (2,5,8,11,15,...), - (negative terms of S).
A062389 and A246046 partition the positive integers, and A258048 and A257984 partition the positive integers.

Crossrefs

Cf. A258048 (complement), A246046, A062380, A258833.

Programs

  • Mathematica
    Table[Ceiling[(n - 1/2) Pi], {n, 1, 120}] (* A257984 *)
    Table[Ceiling[(n + 1/2) Pi/(Pi - 1)], {n, 0, 120}]  (* A258048 *)

Formula

a(n) = ceiling((n - 1/2)*Pi).

A372227 a(n) = Sum_{k=1..n} sigma( (n/gcd(k,n))^2 ).

Original entry on oeis.org

1, 8, 27, 70, 125, 216, 343, 578, 753, 1000, 1331, 1890, 2197, 2744, 3375, 4666, 4913, 6024, 6859, 8750, 9261, 10648, 12167, 15606, 15745, 17576, 20427, 24010, 24389, 27000, 29791, 37418, 35937, 39304, 42875, 52710, 50653, 54872, 59319, 72250, 68921, 74088
Offset: 1

Views

Author

Seiichi Manyama, May 19 2024

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := DivisorSum[n, EulerPhi[#] * DivisorSigma[1, #^2] &]; Array[a, 100] (* Amiram Eldar, May 20 2024 *)
  • PARI
    a(n) = sumdiv(n, d, eulerphi(d)*sigma(d^2));

Formula

If k is squarefree (cf. A005117) then a(k) = k^3.
a(n) = Sum_{d|n} phi(d) * sigma(d^2).
From Amiram Eldar, May 20 2024: (Start)
Multiplicative with a(p^e) = (p^(3*e+3)-1)/(p^3-1) - (p^e-1)/(p-1).
Sum_{k=1..n} a(k) ~ c * n^4 / 4, where c = (Pi^2/15) * zeta(3) * Product_{p prime} (1 + 1/p^2 - 1/p^3) = 1.03291869994469216597... . (End)

A372997 a(n) = Sum_{k=1..n} tau( (n/gcd(k,n))^3 ).

Original entry on oeis.org

1, 5, 9, 19, 17, 45, 25, 59, 51, 85, 41, 171, 49, 125, 153, 163, 65, 255, 73, 323, 225, 205, 89, 531, 157, 245, 231, 475, 113, 765, 121, 419, 369, 325, 425, 969, 145, 365, 441, 1003, 161, 1125, 169, 779, 867, 445, 185, 1467, 319, 785, 585, 931, 209, 1155, 697, 1475
Offset: 1

Views

Author

Seiichi Manyama, May 19 2024

Keywords

Crossrefs

Programs

  • Mathematica
    f[p_, e_] := (3 - (3*e+4)*p^e + (3*e+1)*p^(e+1))/(p-1); a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, May 21 2024 *)
  • PARI
    a(n) = sumdiv(n, d, eulerphi(d)*numdiv(d^3));

Formula

If p is prime, a(p) = 4*p - 3.
a(n) = Sum_{d|n} phi(d) * tau(d^3).
Multiplicative with a(p^e) = (3 - (3*e+4)*p^e + (3*e+1)*p^(e+1))/(p-1). - Amiram Eldar, May 21 2024

A372999 a(n) = Sum_{k=1..n} tau( (n/gcd(k,n))^4 ).

Original entry on oeis.org

1, 6, 11, 24, 21, 66, 31, 76, 65, 126, 51, 264, 61, 186, 231, 212, 81, 390, 91, 504, 341, 306, 111, 836, 201, 366, 299, 744, 141, 1386, 151, 548, 561, 486, 651, 1560, 181, 546, 671, 1596, 201, 2046, 211, 1224, 1365, 666, 231, 2332, 409, 1206, 891, 1464, 261, 1794
Offset: 1

Views

Author

Seiichi Manyama, May 19 2024

Keywords

Crossrefs

Programs

  • Mathematica
    f[p_, e_] := (4 - (4*e+5)*p^e + (4*e+1)*p^(e+1))/(p-1); a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, May 21 2024 *)
  • PARI
    a(n) = sumdiv(n, d, eulerphi(d)*numdiv(d^4));

Formula

If p is prime, a(p) = 5*p - 4.
a(n) = Sum_{d|n} phi(d) * tau(d^4).
Multiplicative with a(p^e) = (4 - (4*e+5)*p^e + (4*e+1)*p^(e+1))/(p-1). - Amiram Eldar, May 21 2024

A258048 Nonhomogeneous Beatty sequence: a(n) = ceiling((n + 1/2)*Pi/(Pi - 1)).

Original entry on oeis.org

1, 3, 4, 6, 7, 9, 10, 12, 13, 14, 16, 17, 19, 20, 22, 23, 25, 26, 28, 29, 31, 32, 34, 35, 36, 38, 39, 41, 42, 44, 45, 47, 48, 50, 51, 53, 54, 56, 57, 58, 60, 61, 63, 64, 66, 67, 69, 70, 72, 73, 75, 76, 78, 79, 80, 82, 83, 85, 86, 88, 89, 91, 92, 94, 95, 97
Offset: 0

Views

Author

Clark Kimberling, Jun 15 2015

Keywords

Comments

See A257984.

Crossrefs

Cf. A257984 (complement), A246046, A062380, A258833.

Programs

  • Mathematica
    Table[Ceiling[(n - 1/2) Pi], {n, 1, 120}] (* A257984 *)
    Table[Ceiling[(n + 1/2) Pi/(Pi - 1)], {n, 0, 120}]  (* A258048 *)

Formula

a(n) = ceiling((n + 1/2)*Pi/(Pi - 1)).
Showing 1-10 of 12 results. Next