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

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

A035191 Coefficients in expansion of Dirichlet series Product_p (1-(Kronecker(m,p)+1)*p^(-s)+Kronecker(m,p)*p^(-2s))^(-1) for m = 9.

Original entry on oeis.org

1, 2, 1, 3, 2, 2, 2, 4, 1, 4, 2, 3, 2, 4, 2, 5, 2, 2, 2, 6, 2, 4, 2, 4, 3, 4, 1, 6, 2, 4, 2, 6, 2, 4, 4, 3, 2, 4, 2, 8, 2, 4, 2, 6, 2, 4, 2, 5, 3, 6, 2, 6, 2, 2, 4, 8, 2, 4, 2, 6, 2, 4, 2, 7, 4, 4, 2, 6, 2, 8, 2, 4, 2, 4, 3, 6, 4, 4, 2, 10, 1
Offset: 1

Views

Author

Keywords

Comments

Number of divisors of n not congruent to 0 mod 3. - Vladeta Jovovic, Oct 26 2001
a(n) is the number of factors (over Q) of the polynomial x^(2n) + x^n + 1 . a(n) = d(3n) - d(n) where d() is the divisor function. - Yuval Dekel (dekelyuval(AT)hotmail.com), Aug 28 2003
Equals Mobius transform of A011655. - Gary W. Adamson, Apr 24 2009

Crossrefs

Programs

  • Haskell
    a035191 n = a001817 n + a001822 n  -- Reinhard Zumkeller, Nov 26 2011
    
  • Magma
    [NumberOfDivisors(n)/Valuation(3*n, 3): n in [1..100]]; // Vincenzo Librandi, Jun 03 2019
  • 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 := 1:else b := e+1:fi:s := s*b:od:printf(`%d,`,s); od:
    # alternative
    A035191 := proc(n)
        A001817(n)+A001822(n) ;
    end proc:
    [seq(A035191(n),n=1..100)] ; # R. J. Mathar, Sep 25 2017
  • Mathematica
    a[n_] := If[n < 0, 0, DivisorSum[n, KroneckerSymbol[9, #] &]]; Table[ a[n], {n, 1, 100}] (* G. C. Greubel, Apr 27 2018 *)
    f[3, e_] := 1; f[p_, e_] := e+1; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Sep 26 2020 *)
  • PARI
    my(m=9); direuler(p=2,101,1/(1-(kronecker(m,p)*(X-X^2))-X))
    
  • PARI
    a(n) = sumdiv(n, d, kronecker(9, d)); \\ Amiram Eldar, Nov 20 2023
    

Formula

Multiplicative with a(3^e)=1 and a(p^e)=e+1 for p<>3.
G.f.: Sum_{k>0} x^k*(1+x^k)/(1-x^(3*k)). - Vladeta Jovovic, Dec 16 2002
a(n) = A001817(n) + A001822(n). [Reinhard Zumkeller, Nov 26 2011]
a(n) = tau(3*n) - tau(n). - Ridouane Oudra, Sep 05 2020
From Amiram Eldar, Nov 27 2022: (Start)
Dirichlet g.f.: zeta(s)^2 * (1 - 1/3^s).
Sum_{k=1..n} a(k) ~ (2*n*log(n) + (4*gamma + log(3) - 2)*n)/3, where gamma is Euler's constant (A001620). (End)
a(n) = Sum_{d|n} Kronecker(9, d). - Amiram Eldar, Nov 20 2023
a(n) = A000005(A038502(n)). - Ridouane Oudra, Sep 30 2024

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

Original entry on oeis.org

1, 2, 2, 2, 5, 2, 3, 4, 4, 3, 2, 8, 6, 8, 2, 4, 4, 6, 6, 4, 4, 2, 10, 4, 15, 4, 10, 2, 4, 4, 12, 6, 6, 12, 4, 4, 3, 11, 4, 16, 8, 16, 4, 11, 3, 4, 6, 8, 6, 8, 8, 6, 8, 6, 4, 2, 10, 10, 22, 4, 30, 4, 22, 10, 10, 2, 6, 4, 8, 9, 8, 8, 8, 8, 9, 8, 4, 6
Offset: 1

Views

Author

Peter Luschny, Sep 12 2012

Keywords

Comments

T(n,k) = number of subgroups of C_n X C_k. [Hampjes et al.] - N. J. A. Sloane, Feb 02 2013

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,  5,  4,  8,  4, 10,  4, 11,  6, 10,  4, 16
[ 3] 2,  4,  6,  6,  4, 12,  4,  8, 10,  8,  4, 18
[ 4] 3,  8,  6, 15,  6, 16,  6, 22,  9, 16,  6, 30
[ 5] 2,  4,  4,  6,  8,  8,  4,  8,  6, 16,  4, 12
[ 6] 4, 10, 12, 16,  8, 30,  8, 22, 20, 20,  8, 48
[ 7] 2,  4,  4,  6,  4,  8, 10,  8,  6,  8,  4, 12
[ 8] 4, 11,  8, 22,  8, 22,  8, 37, 12, 22,  8, 44
[ 9] 3,  6, 10,  9,  6, 20,  6, 12, 23, 12,  6, 30
[10] 4, 10,  8, 16, 16, 20,  8, 22, 12, 40,  8, 32
[11] 2,  4,  4,  6,  4,  8,  4,  8,  6,  8, 14, 12
[12] 6, 16, 18, 30, 12, 48, 12, 44, 30, 32, 12, 90
.
Displayed as a triangular array:
1,
2,  2,
2,  5,  2,
3,  4,  4,  3,
2,  8,  6,  8, 2,
4,  4,  6,  6, 4,  4,
2, 10,  4, 15, 4, 10, 2,
4,  4, 12,  6, 6, 12, 4,  4,
3, 11,  4, 16, 8, 16, 4, 11, 3,
		

Crossrefs

Programs

  • Maple
    with(numtheory):
    T:= (n, k)-> add(add(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
    T:=proc(m,n) local d; add( d*tau(m*n/d^2), d in divisors(gcd(m,n))); end; # N. J. A. Sloane, Feb 02 2013
  • Mathematica
    t[n_, k_] := Sum[Sum[GCD[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, May 21 2013 *)
  • Sage
    def A216624(n, k) :
        cp = cartesian_product([divisors(n), divisors(k)])
        return reduce(lambda x,y: x+y, map(gcd, cp))
    for n in (1..12): [A216624(n,k) for k in (1..12)]

Formula

T(n,n) = A060724(n) = sum_{d|n} d*tau((n/d)^2).
T(n,1) = T(1,n) = A000005(n) = tau(n).
T(n,2) = T(2,n) = A060710(n) = sum_{d|n} (3-[d is odd]) (Iverson bracket).
T(n+1,n) = A092517(n) = tau(n+1)*tau(n).
T(prime(n),1) = A007395(n) = 2.
T(prime(n),prime(n)) = A113935(n) = prime(n)+3.
Showing 1-3 of 3 results.