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

A060724 Number of subgroups of the group C_n X C_n (where C_n is the cyclic group of order n).

Original entry on oeis.org

1, 5, 6, 15, 8, 30, 10, 37, 23, 40, 14, 90, 16, 50, 48, 83, 20, 115, 22, 120, 60, 70, 26, 222, 45, 80, 76, 150, 32, 240, 34, 177, 84, 100, 80, 345, 40, 110, 96, 296, 44, 300, 46, 210, 184, 130, 50, 498, 75, 225, 120, 240, 56, 380, 112, 370, 132, 160, 62, 720, 64
Offset: 1

Views

Author

Avi Peretz (njk(AT)netvision.net.il), Apr 21 2001

Keywords

Examples

			a(2) = 5 because for the group C_2 X C_2 there are the following subgroups: the trivial subgroup, the whole group and the three subgroups of order 2.
		

Crossrefs

Programs

  • GAP
    List([1..50], n->Sum(ConjugacyClassesSubgroups( LatticeSubgroups( DirectProduct( List([n, n], k->CyclicGroup(k)) ))), Size)); # Andrew Howroyd, Jul 01 2018
    
  • Maple
    for n from 1 to 200 do: ans := 1: for i from 1 to nops(ifactors(n)[2]) do p := ifactors(n)[2][i][1]: e := ifactors(n)[2][i][2]: ans := ans*(p^(e+2)+p^(e+1)+1+2*e-3*p-2*e*p)/(p-1)^2: od: printf(`%d,`,ans): od:
  • Mathematica
    ppCase[ {p_Integer, e_Integer} ] := (1-2*e*(p-1)+p*(p^e*(1+p)-3))/(p-1)^2; Table[ Times @@ (ppCase /@ FactorInteger[ i ]), {i, 1, 100} ]
  • PARI
    a(n)={sumdiv(n, d, eulerphi(n/d)*numdiv(d)^2)} \\ Andrew Howroyd, Jul 01 2018
    
  • PARI
    a(n) = sum(k=1, n, numdiv(gcd(k, n))^2); \\ Seiichi Manyama, May 11 2021
    
  • Sage
    def A060724(n) :
        d = divisors(n); cp = cartesian_product([d, d])
        return reduce(lambda x,y: x+y, map(gcd, cp))
    [A060724(n) for n in (1..61)]   # Peter Luschny, Sep 10 2012

Formula

a(n) is multiplicative: if the canonical factorization of n is the product of p^e(p) over primes then a(n) = product a(p^e(p)). For a prime p: a(p) = p + 3.
a(p^e) = (p^(e+2)+p^(e+1)+1+2*e-3*p-2*e*p)/(p-1)^2.
a(n) = Sum_{i|n, j|n} gcd(i, j). - Vladeta Jovovic, Oct 28 2001
Also a(n) = Sum_{d|n} d*tau((n/d)^2). - Vladeta Jovovic, Apr 01 2002
Also a(n) = Sum_{d|n} phi(n/d)*tau(d)^2.
Inverse Moebius transform of A060648. - Vladeta Jovovic, Mar 31 2009
Dirichlet g.f. zeta^3(s)*zeta(s-1)/zeta(2*s). - R. J. Mathar, Mar 14 2011
a(n) = Sum_{d|n} psi(d)*tau(n/d), where psi is A001615 and tau is A000005. - Enrique Pérez Herrero, Feb 29 2012
Sum_{k=1..n} a(k) ~ 5 * Pi^2 * n^2 / 24. - Vaclav Kotesovec, Jun 02 2019
a(n) = Sum_{k=1..n} tau(gcd(k,n))^2. - Seiichi Manyama, May 11 2021

Extensions

Formula and more terms from Vladeta Jovovic, Jul 06 2001

A216626 Square array read by antidiagonals, T(n,k) = sum_{c|n,d|k} lcm(c,d) for n>=1, k>=1.

Original entry on oeis.org

1, 3, 3, 4, 7, 4, 7, 12, 12, 7, 6, 15, 10, 15, 6, 12, 18, 28, 28, 18, 12, 8, 28, 24, 27, 24, 28, 8, 15, 24, 30, 42, 42, 30, 24, 15, 13, 31, 32, 60, 16, 60, 32, 31, 13, 18, 39, 60, 56, 72, 72, 56, 60, 39, 18, 12, 42, 28, 51, 48, 70, 48, 51, 28, 42, 12, 28, 36
Offset: 1

Views

Author

Peter Luschny, Sep 12 2012

Keywords

Comments

T(n,n) = A064950(n) = sum_{d|n} d*tau(d^2).
T(n,1) = T(1,n) = A000203(n) = sigma(n).
T(n,2) = T(2,n) = A062731(n) = sigma(2*n).
T(n+1,n) = A083539(n) = sigma(n+1)*sigma(n).
T(prime(n),1) = A008864(n) = prime(n)+1.

Examples

			[-----1---2---3----4----5----6----7----8----9---10---11---12]
[ 1]  1,  3,  4,   7,   6,  12,   8,  15,  13,  18,  12,  28
[ 2]  3,  7, 12,  15,  18,  28,  24,  31,  39,  42,  36,  60
[ 3]  4, 12, 10,  28,  24,  30,  32,  60,  28,  72,  48,  70
[ 4]  7, 15, 28,  27,  42,  60,  56,  51,  91,  90,  84, 108
[ 5]  6, 18, 24,  42,  16,  72,  48,  90,  78,  48,  72, 168
[ 6] 12, 28, 30,  60,  72,  70,  96, 124,  84, 168, 144, 150
[ 7]  8, 24, 32,  56,  48,  96,  22, 120, 104, 144,  96, 224
[ 8] 15, 31, 60,  51,  90, 124, 120,  83, 195, 186, 180, 204
[ 9] 13, 39, 28,  91,  78,  84, 104, 195,  55, 234, 156, 196
[10] 18, 42, 72,  90,  48, 168, 144, 186, 234, 112, 216, 360
[11] 12, 36, 48,  84,  72, 144,  96, 180, 156, 216,  34, 336
[12] 28, 60, 70, 108, 168, 150, 224, 204, 196, 360, 336, 270
.
Displayed as a triangular array:
    1;
    3,  3;
    4,  7,  4;
    7, 12, 12,  7;
    6, 15, 10, 15,  6;
   12, 18, 28, 28, 18, 12;
    8, 28, 24, 27, 24, 28,  8;
   15, 24, 30, 42, 42, 30, 24, 15;
   13, 31, 32, 60, 16, 60, 32, 31, 13;
		

Crossrefs

Programs

  • Maple
    with(numtheory):
    T:= (n, k) -> add(add(ilcm(c, d), c=divisors(n)), d=divisors(k)):
    seq (seq (T(n, 1+d-n), n=1..d), d=1..12);  # Alois P. Heinz, Sep 12 2012
  • Mathematica
    T[n_, k_] := Sum[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, Mar 25 2014 *)
  • Sage
    def A216626(n, k) :
        cp = cartesian_product([divisors(n), divisors(k)])
        return reduce(lambda x,y: x+y, map(lcm, cp))
    for n in (1..12): [A216626(n,k) for k in (1..12)]

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

Original entry on oeis.org

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

Views

Author

Peter Luschny, Sep 12 2012

Keywords

Comments

T(n,n) = A060648(n) = Sum_{d|n} Dedekind_Psi(d).
T(n,1) = T(1,n) = A000005(n) = tau(n).
T(n,2) = T(2,n) = A062011(n) = 2*tau(n).
T(n+1,n) = A092517(n) = tau(n+1)*tau(n).
T(prime(n),1) = A007395(n) = 2.
T(prime(n),prime(n)) = A052147(n) = prime(n)+2.

Examples

			[----1---2---3---4---5---6---7---8---9--10--11--12]
[ 1] 1,  2,  2,  3,  2,  4,  2,  4,  3,  4,  2,  6
[ 2] 2,  4,  4,  6,  4,  8,  4,  8,  6,  8,  4, 12
[ 3] 2,  4,  5,  6,  4, 10,  4,  8,  8,  8,  4, 15
[ 4] 3,  6,  6, 10,  6, 12,  6, 14,  9, 12,  6, 20
[ 5] 2,  4,  4,  6,  7,  8,  4,  8,  6, 14,  4, 12
[ 6] 4,  8, 10, 12,  8, 20,  8, 16, 16, 16,  8, 30
[ 7] 2,  4,  4,  6,  4,  8,  9,  8,  6,  8,  4, 12
[ 8] 4,  8,  8, 14,  8, 16,  8, 22, 12, 16,  8, 28
[ 9] 3,  6,  8,  9,  6, 16,  6, 12, 17, 12,  6, 24
[10] 4,  8,  8, 12, 14, 16,  8, 16, 12, 28,  8, 24
[11] 2,  4,  4,  6,  4,  8,  4,  8,  6,  8, 13, 12
[12] 6, 12, 15, 20, 12, 30, 12, 28, 24, 24, 12, 50
.
Displayed as a triangular array:
   1,
   2, 2,
   2, 4,  2,
   3, 4,  4,  3,
   2, 6,  5,  6, 2,
   4, 4,  6,  6, 4,  4,
   2, 8,  4, 10, 4,  8, 2,
   4, 4, 10,  6, 6, 10, 4, 4,
   3, 8,  4, 12, 7, 12, 4, 8, 3,
		

Crossrefs

Programs

  • Maple
    with(numtheory):
    T:= (n, k)-> add(add(phi(igcd(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_] := Outer[ EulerPhi[ GCD[#1, #2]]&, Divisors[n], Divisors[k]] // Flatten // Total; Table[ t[n-k+1, k], {n, 1, 13}, {k, 1, n}] // Flatten (* Jean-François Alcover, Jun 26 2013 *)
  • Sage
    def A216620(n, k) :
        cp = cartesian_product([divisors(n), divisors(k)])
        return reduce(lambda x,y: x+y, map(euler_phi, map(gcd, cp)))
    for n in (1..12): [A216620(n,k) for k in (1..12)]

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

Original entry on oeis.org

1, 2, 4, 2, 4, 5, 3, 6, 6, 10, 2, 4, 4, 6, 7, 4, 8, 10, 12, 8, 20, 2, 4, 4, 6, 4, 8, 9, 4, 8, 8, 14, 8, 16, 8, 22, 3, 6, 8, 9, 6, 16, 6, 12, 17, 4, 8, 8, 12, 14, 16, 8, 16, 12, 28, 2, 4, 4, 6, 4, 8, 4, 8, 6, 8, 13, 6, 12, 15, 20, 12, 30, 12, 28, 24, 24, 12
Offset: 1

Views

Author

Peter Luschny, Sep 12 2012

Keywords

Comments

This is the lower triangular array of A216620, which is the main entry for this sequence.
T(n,1) = A000005(n) = tau(n).
T(n,n) = A060648(n) = sum{d|n} Dedekind_Psi(d).

Examples

			The first rows of the triangle are:
  1;
  2,  4;
  2,  4,  5;
  3,  6,  6, 10;
  2,  4,  4,  6,  7;
  4,  8, 10, 12,  8, 20;
  2,  4,  4,  6,  4,  8,  9;
  4,  8,  8, 14,  8, 16,  8, 22;
  3,  6,  8,  9,  6, 16,  6, 12, 17;
  4,  8,  8, 12, 14, 16,  8, 16, 12, 28;
  2,  4,  4,  6,  4,  8,  4,  8,  6,  8, 13;
		

Crossrefs

Programs

  • Maple
    with(numtheory):
    T:= (n, k)-> add(add(phi(igcd(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[GCD[c, d]], {c, Divisors[n]}, {d, Divisors[k]}]; Table[t[n, k], {n, 1, 12}, {k, 1, n}] // Flatten (* Jean-François Alcover, Jun 28 2013 *)
  • Sage
    for n in (1..9): [A216620(n,k) for k in (1..n)]

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

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

Original entry on oeis.org

1, 2, 5, 2, 4, 6, 3, 8, 6, 15, 2, 4, 4, 6, 8, 4, 10, 12, 16, 8, 30, 2, 4, 4, 6, 4, 8, 10, 4, 11, 8, 22, 8, 22, 8, 37, 3, 6, 10, 9, 6, 20, 6, 12, 23, 4, 10, 8, 16, 16, 20, 8, 22, 12, 40, 2, 4, 4, 6, 4, 8, 4, 8, 6, 8, 14, 6, 16, 18, 30, 12, 48, 12, 44, 30, 32
Offset: 1

Views

Author

Peter Luschny, Sep 12 2012

Keywords

Comments

This is the lower triangular array of A216624, which is the main entry for this sequence.
T(n,1) = A000005(n) = tau(n).
T(n,n) = A060724(n) = Sum_{d|n} d*tau((n/d)^2).

Examples

			The first rows of the triangle are:
  1;
  2,  5;
  2,  4,  6;
  3,  8,  6, 15;
  2,  4,  4,  6,  8;
  4, 10, 12, 16,  8, 30;
  2,  4,  4,  6,  4,  8, 10;
  4, 11,  8, 22,  8, 22,  8, 37;
  3,  6, 10,  9,  6, 20,  6, 12, 23;
		

Crossrefs

Programs

  • Maple
    with(numtheory):
    T:= (n, k)-> add(add(igcd(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[GCD[c, d], {c, Divisors[n]}, {d, Divisors[k]}]; Table[T[n, k], {n, 1, 14}, {k, 1, n}] // Flatten (* Jean-François Alcover, Mar 25 2014 *)
  • Sage
    for n in (1..9): [A216624(n,k) for k in (1..n)]

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

Original entry on oeis.org

1, 3, 7, 4, 12, 10, 7, 15, 28, 27, 6, 18, 24, 42, 16, 12, 28, 30, 60, 72, 70, 8, 24, 32, 56, 48, 96, 22, 15, 31, 60, 51, 90, 124, 120, 83, 13, 39, 28, 91, 78, 84, 104, 195, 55, 18, 42, 72, 90, 48, 168, 144, 186, 234, 112, 12, 36, 48, 84, 72, 144, 96, 180, 156
Offset: 1

Views

Author

Peter Luschny, Sep 12 2012

Keywords

Comments

This is the lower triangular array of A216626, which is the main entry for this sequence.

Examples

			The first rows of the triangle are:
1;
3,   7;
4,  12, 10;
7,  15, 28, 27;
6,  18, 24, 42, 16;
12, 28, 30, 60, 72,  70;
8,  24, 32, 56, 48,  96,  22;
15, 31, 60, 51, 90, 124, 120,  83;
13, 39, 28, 91, 78,  84, 104, 195, 55;
		

Crossrefs

Programs

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

Formula

T(n,1) = A000203(n) = sigma(n).
T(n,n) = A064950(n) = sum_{d|n} d*tau(d^2).

A060710 Number of subgroups of dihedral group with 2n elements, counting conjugate subgroups only once, i.e., conjugacy classes of subgroups of the dihedral group.

Original entry on oeis.org

2, 5, 4, 8, 4, 10, 4, 11, 6, 10, 4, 16, 4, 10, 8, 14, 4, 15, 4, 16, 8, 10, 4, 22, 6, 10, 8, 16, 4, 20, 4, 17, 8, 10, 8, 24, 4, 10, 8, 22, 4, 20, 4, 16, 12, 10, 4, 28, 6, 15, 8, 16, 4, 20, 8, 22, 8, 10, 4, 32, 4, 10, 12, 20, 8, 20, 4, 16, 8, 20, 4, 33, 4, 10, 12, 16, 8, 20, 4, 28, 10, 10, 4
Offset: 1

Views

Author

Avi Peretz (njk(AT)netvision.net.il), Apr 21 2001

Keywords

Comments

The total number of subgroups, counting conjugate subgroups as distinct, is A007503.
Also the number of subgroups of the group C_n x C_2 (where C_n is the cyclic group with n elements).

Examples

			The dihedral group D6 is isomorphic to the symmetric group S_3 and the conjugacy classes of subgroups are: the trivial group, the whole group, subgroup of order 2 generated by a transposition and the subgroup A_3 generated by the 3-cycles. So a(3) = 4.
		

Crossrefs

A row of A216624.

Programs

  • Mathematica
    a[n_] := DivisorSum[n, 3-Mod[#,2]&];
    Array[a, 100] (* Jean-François Alcover, Jun 03 2019 *)
  • PARI
    a(n)=if(n<1, 0, sumdiv(n,d, 3-d%2)) /* Michael Somos, Sep 20 2005 */
    
  • PARI
    { for (n=1, 1000, write("b060710.txt", n, " ", sumdiv(n, d, 3 - d%2)); ) } \\ Harry J. Smith, Jul 10 2009
    
  • Sage
    def A060710(n): return add(3 - int(is_odd(d)) for d in divisors(n))
    [A060710(n) for n in (1..83)] # Peter Luschny, Sep 12 2012

Formula

For even n, a(n) = 2*tau(n) + tau(n/2).
For odd n, a(n) = tau(2n) = 2*tau(n) = 2*A000005(n). - Ahmed Fares (ahmedfares(AT)my-deja.com), Jul 12 2001
From Michael Somos, Sep 20 2005: (Start)
Moebius transform is period 2 sequence [2, 3, ...].
G.f.: Sum_{k>0} x^k*(2+3x^k)/(1-x^(2k)) = Sum_{k>0} 2*x^(2k-1)/(1-x^(2k-1)) + 3*x^(2k)/(1-x^(2k)). (End)
a(n) = 4*tau(n) - tau(2n). - Ridouane Oudra, Jan 16 2023
Sum_{k=1..n} a(k) ~ n*(5*log(n) + 10*gamma - log(2) - 5)/2, where gamma is Euler's constant (A001622). - Amiram Eldar, Jan 21 2023

Extensions

More terms from Vladeta Jovovic, Jul 15 2001

A054584 Number of subgroups of the group generated by a^n=1, b^3=1 and ab=ba.

Original entry on oeis.org

2, 4, 6, 6, 4, 12, 4, 8, 10, 8, 4, 18, 4, 8, 12, 10, 4, 20, 4, 12, 12, 8, 4, 24, 6, 8, 14, 12, 4, 24, 4, 12, 12, 8, 8, 30, 4, 8, 12, 16, 4, 24, 4, 12, 20, 8, 4, 30, 6, 12, 12, 12, 4, 28, 8, 16, 12, 8, 4, 36, 4, 8, 20, 14, 8, 24, 4, 12, 12, 16, 4, 40, 4, 8, 18, 12, 8, 24, 4, 20, 18, 8, 4
Offset: 1

Views

Author

John W. Layman, Apr 12 2000

Keywords

Comments

Also the number of subgroups of the group C_n X C_3 (where C_n is the cyclic group of order n). Number of subgroups of the group C_n X C_m is Sum_{i|n,j|m} gcd(i,j).

Crossrefs

Programs

  • Haskell
    a054584 n = a000005 n + 3 * a079978 n * a000005 (a051176 n) + a035191 n
    -- Reinhard Zumkeller, Aug 27 2012
  • Maple
    for n from 1 to 500 do a := ifactors(n):s := 1:for k from 1 to nops(a[2]) do p := a[2][k][1]:e := a[2][k][2]: if p=3 then b := 2*e+1:else b := e+1:fi:s := s*b:od:printf(`%d,`,2*s); od:
  • Mathematica
    f[d_ /; Mod[d, 3] == 0] = 4; f[] = 2; a[n] := Total[f /@ Divisors[n]]; Table[a[n], {n, 1, 100}](* Jean-François Alcover, Nov 21 2011, after Michael Somos *)
    f[p_, e_] := e + 1; f[3, e_] := 2*e + 1; a[1] = 2; a[n_] := 2*Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Nov 29 2022 *)
  • PARI
    a(n)=if(n<1, 0, sumdiv(n,d, (d%3==0)*2+2)) /* Michael Somos, Sep 20 2005 */
    

Formula

a(n) = tau(n)+3*tau(n/3)+A035191(n) if n is congruent to 0 mod 3 else tau(n)+A035191(n), where A035191(n) is the number of divisors of n that are not congruent to 0 mod 3.
a(n)/2 is multiplicative with a(3^e)=2e+1 and a(p^e)=e+1 for p<>3.
Moebius transform is period 3 sequence [2, 2, 4, ...]. - Michael Somos, Sep 20 2005
G.f.: Sum_{k>0} x^k(2+2*x^k+4*x^(2k))/(1-x^(3k)).
From Amiram Eldar, Nov 29 2022: (Start)
Dirichlet g.f.: 2 * zeta(s)^2 * (1 + 1/3^s).
Sum_{k=1..n} a(k) ~ 2*(4*n*log(n) + (8*gamma - 4 - log(3))*n)/3, where gamma is Euler's constant (A001620). (End)

Extensions

Additional comments from Vladeta Jovovic, Oct 25 2001
Showing 1-10 of 12 results. Next