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

A047968 a(n) = Sum_{d|n} p(d), where p(d) = A000041 = number of partitions of d.

Original entry on oeis.org

1, 3, 4, 8, 8, 17, 16, 30, 34, 52, 57, 99, 102, 153, 187, 261, 298, 432, 491, 684, 811, 1061, 1256, 1696, 1966, 2540, 3044, 3876, 4566, 5846, 6843, 8610, 10203, 12610, 14906, 18491, 21638, 26508, 31290, 38044, 44584, 54133, 63262, 76241
Offset: 1

Views

Author

N. J. A. Sloane, Dec 11 1999

Keywords

Comments

Inverse Moebius transform of A000041.
Row sums of triangle A137587. - Gary W. Adamson, Jan 27 2008
Row sums of triangle A168021. - Omar E. Pol, Nov 20 2009
Row sums of triangle A168017. Row sums of triangle A168018. - Omar E. Pol, Nov 25 2009
Sum of the partition numbers of the divisors of n. - Omar E. Pol, Feb 25 2014
Conjecture: for n > 6, a(n) is strictly increasing. - Franklin T. Adams-Watters, Apr 19 2014
Number of constant multiset partitions of multisets spanning an initial interval of positive integers with multiplicities an integer partition of n. - Gus Wiseman, Sep 16 2018

Examples

			For n = 10 the divisors of 10 are 1, 2, 5, 10, hence the partition numbers of the divisors of 10 are 1, 2, 7, 42, so a(10) = 1 + 2 + 7 + 42 = 52. - _Omar E. Pol_, Feb 26 2014
From _Gus Wiseman_, Sep 16 2018: (Start)
The a(6) = 17 constant multiset partitions:
  (111111)  (111)(111)    (11)(11)(11)  (1)(1)(1)(1)(1)(1)
  (111222)  (12)(12)(12)
  (111122)  (112)(112)
  (112233)  (123)(123)
  (111112)
  (111123)
  (111223)
  (111234)
  (112234)
  (112345)
  (123456)
(End)
		

Crossrefs

Programs

  • Maple
    with(combinat): with(numtheory): a := proc(n) c := 0: l := sort(convert(divisors(n), list)): for i from 1 to nops(l) do c := c+numbpart(l[i]) od: RETURN(c): end: for j from 1 to 60 do printf(`%d, `, a(j)) od: # Zerinvary Lajos, Apr 14 2007
  • Mathematica
    a[n_] := Sum[ PartitionsP[d], {d, Divisors[n]}]; Table[a[n], {n, 1, 44}] (* Jean-François Alcover, Oct 03 2013 *)

Formula

G.f.: Sum_{k>0} (-1+1/Product_{i>0} (1-z^(k*i))). - Vladeta Jovovic, Jun 22 2003
G.f.: sum(n>0,A000041(n)*x^n/(1-x^n)). - Mircea Merca, Feb 24 2014.
a(n) = A168111(n) + A000041(n). - Omar E. Pol, Feb 26 2014
a(n) = Sum_{y is a partition of n} A000005(GCD(y)). - Gus Wiseman, Sep 16 2018

A034729 a(n) = Sum_{ k, k|n } 2^(k-1).

Original entry on oeis.org

1, 3, 5, 11, 17, 39, 65, 139, 261, 531, 1025, 2095, 4097, 8259, 16405, 32907, 65537, 131367, 262145, 524827, 1048645, 2098179, 4194305, 8390831, 16777233, 33558531, 67109125, 134225995, 268435457, 536887863, 1073741825, 2147516555, 4294968325, 8590000131
Offset: 1

Views

Author

Keywords

Comments

Dirichlet convolution of b_n=1 with c_n = 2^(n-1).
Equals row sums of triangle A143425, & inverse Möbius transform (A051731) of [1, 2, 4, 8, ...]. - Gary W. Adamson, Aug 14 2008
Number of constant multiset partitions of normal multisets of size n, where a multiset is normal if it spans an initial interval of positive integers. - Gus Wiseman, Sep 16 2018

Examples

			From _Gus Wiseman_, Sep 16 2018: (Start)
The a(4) = 11 constant multiset partitions:
  (1)(1)(1)(1)
    (11)(11)
    (12)(12)
     (1111)
     (1222)
     (1122)
     (1112)
     (1233)
     (1223)
     (1123)
     (1234)
(End)
		

Crossrefs

Cf. A289508.
Sums of the form Sum_{d|n} q^(d-1): this sequence (q=2), A034730 (q=3), A113999 (q=10), A339684 (q=4), A339685 (q=5), A339686 (q=6), A339687 (q=7), A339688 (q=8), A339689 (q=9).

Programs

  • Magma
    A034729:= func< n | (&+[2^(d-1): d in Divisors(n)]) >;
    [A034729(n): n in [1..40]]; // G. C. Greubel, Jun 26 2024
    
  • Maple
    seq(add(2^(k-1),k=numtheory:-divisors(n)), n = 1 .. 100); # Robert Israel, Aug 22 2014
  • Mathematica
    Rest[CoefficientList[Series[Sum[x^k/(1-2*x^k),{k,1,30}],{x,0,30}],x]] (* Vaclav Kotesovec, Sep 08 2014 *)
  • PARI
    A034729(n) = sumdiv(n,k,2^(k-1)) \\ Michael B. Porter, Mar 11 2010
    
  • PARI
    {a(n)=polcoeff(sum(m=1,n,2^(m-1)*x^m/(1-x^m +x*O(x^n))),n)}
    for(n=1,40,print1(a(n),", ")) \\ Paul D. Hanna, Aug 21 2014
    
  • PARI
    {a(n)=local(A=x+x^2);A=sum(m=1,n,x^m*sumdiv(m,d,1/(1 - x^(m/d) +x*O(x^n))^d) );polcoeff(A,n)}
    for(n=1,40,print1(a(n),", ")) \\ Paul D. Hanna, Aug 21 2014
    
  • Python
    from sympy import divisors
    def A034729(n): return sum(1<<(d-1) for d in divisors(n,generator=True)) # Chai Wah Wu, Jul 15 2022
    
  • SageMath
    def A034729(n): return sum(2^(k-1) for k in (1..n) if (k).divides(n))
    [A034729(n) for n in range(1,41)] # G. C. Greubel, Jun 26 2024

Formula

G.f.: Sum_{n>0} x^n/(1-2*x^n). - Vladeta Jovovic, Nov 14 2002
a(n) = 1/2 * A055895(n). - Joerg Arndt, Aug 14 2012
G.f.: Sum_{n>=1} 2^(n-1) * x^n / (1 - x^n). - Paul D. Hanna, Aug 21 2014
G.f.: Sum_{n>=1} x^n * Sum_{d|n} 1/(1 - x^d)^(n/d). - Paul D. Hanna, Aug 21 2014
a(n) ~ 2^(n-1). - Vaclav Kotesovec, Sep 09 2014
a(n) = Sum_{k in row n of A215366} A008480(k) * A000005(A289508(k)). - Gus Wiseman, Sep 16 2018
a(n) = Sum_{c is a composition of n} A000005(gcd(c)). - Gus Wiseman, Sep 16 2018

A034738 Dirichlet convolution of b_n = 2^(n-1) with phi(n).

Original entry on oeis.org

1, 3, 6, 12, 20, 42, 70, 144, 270, 540, 1034, 2112, 4108, 8274, 16440, 32928, 65552, 131418, 262162, 524880, 1048740, 2098206, 4194326, 8391024, 16777300, 33558564, 67109418, 134226120, 268435484, 536888520, 1073741854, 2147516736
Offset: 1

Views

Author

Keywords

Comments

Sum of GCD's of parts in all compositions of n. - Vladeta Jovovic, Aug 13 2003
From Petros Hadjicostas, Dec 07 2017: (Start)
It also equals the sum of all lengths of all cyclic compositions of n. This was proved in Perez (2008).
The bivariate g.f. for the number b(n,k) of all cyclic of compositions of n with k parts is Sum_{n,k>=1} b(n,k)*x^n*y^k = -Sum_{s>=1} (phi(s)/s)*log(1 - y^s*Sum_{t>=1} x^{s*t}) = -Sum_{s>=1} (phi(s)/s)*log(1 - y^s*x^s/(1-x^s)). See, for example, Hadjicostas (2016). Differentiating w.r.t. y and setting y = 1, we get Sum_{n>=1} a(n)*x^n = Sum_{n>=1} (Sum_{k=1..n} b(n,k)*k)*x^n = Sum_{s>=1} phi(s)*x^s/(1-2*x^s).
(End)

Examples

			For the compositions of n=4 we have a(4) = gcd(4) + gcd(1,3) + gcd(3,1) + gcd(2,2) + gcd(2,1,1) + gcd(1,2,1) + gcd(1,1,2) + gcd(1,1,1,1) = 4 + 1 + 1 + 2 + 1 + 1 + 1 + 1 = 12. Also, for cyclic compositions of n=4, we have length(4) + length(1,3) + length(2,2) + length(1,1,2) + length(1,1,1,1) = 1 + 2 + 2 + 3 + 4 = 12.
		

Crossrefs

Programs

  • Mathematica
    Table[Sum[EulerPhi[d]*2^(n/d-1), {d, Divisors[n]}], {n, 1, 40}] (* Vaclav Kotesovec, Feb 07 2019 *)
  • PARI
    a(n) = sum(k=1, n, 2^(gcd(k, n)-1)); \\ Seiichi Manyama, Apr 17 2021
    
  • PARI
    a(n) = sumdiv(n, d, eulerphi(n/d)*2^(d-1)); \\ Seiichi Manyama, Apr 17 2021
    
  • PARI
    my(N=40, x='x+O('x^N)); Vec(sum(k=1, N, eulerphi(k)*x^k/(1-2*x^k))) \\ Seiichi Manyama, Apr 17 2021

Formula

a(n) = A053635(n)/2.
a(n) = (1/2)* Sum_{d|n} phi(d)*2^(n/d), n >= 1.
G.f.: Sum_{s>=1} phi(s)*x^s/(1-2*x^s). - Petros Hadjicostas, Dec 07 2017
a(n) ~ 2^(n-1). - Vaclav Kotesovec, Feb 07 2019
a(n) = Sum_{k=1..n} 2^(gcd(k, n) - 1). - Seiichi Manyama, Apr 17 2021
a(n) = Sum_{k=1..n} 2^(n/gcd(n,k) - 1)*phi(gcd(n,k))/phi(n/gcd(n,k)). - Richard L. Ollerton, May 06 2021

A181844 Sum over all partitions of n of the LCM of the parts.

Original entry on oeis.org

1, 1, 3, 6, 12, 23, 38, 73, 118, 198, 318, 530, 819, 1298, 1974, 2975, 4516, 6698, 9980, 14550, 21186, 30304, 43503, 62030, 87908, 123292, 172543, 239720, 331688, 458198, 629376, 860332, 1168172, 1583176, 2138438, 2876283, 3859770, 5159886, 6863702, 9112356
Offset: 0

Views

Author

Peter Luschny, Dec 07 2010

Keywords

Comments

Old name was: Row sums of A181842.

Crossrefs

Cf. A078392 (the same for GCD), A181843, A181842, A256067, A256553, A256554, A306956.

Programs

  • Maple
    with(combstruct):
    a181844 := proc(n) local k,L,l,R,part;
    R := NULL; L := 0;
    for k from 1 to n do
       part := iterstructs(Partition(n),size=k):
       while not finished(part) do
          l := nextstruct(part);
          L := L + ilcm(op(l));
       od;
    od;
    L end:
    # second Maple program:
    b:= proc(n, i, r) option remember; `if`(n=0, r, `if`(i<1, 0,
           b(n, i-1, r)+b(n-i, min(i, n-i), ilcm(i, r))))
        end:
    a:= n-> b(n$2, 1):
    seq(a(n), n=0..42);  # Alois P. Heinz, Mar 18 2019
  • Mathematica
    t[n_, k_] := LCM @@@ IntegerPartitions[n, {n - k + 1}] // Total; a[n_] := Sum[t[n, k], {k, 1, n}]; Table[a[n], {n, 1, 32}] (* Jean-François Alcover, Jul 26 2013 *)

Formula

a(n) = Sum_{k>=0} k * A256067(n,k) = Sum_{k>=0} A256553(n,k)*A256554(n,k). - Alois P. Heinz, Apr 02 2015

Extensions

a(0)=1 prepended by Alois P. Heinz, Mar 29 2015
New name from Alois P. Heinz, Mar 18 2019

A327029 T(n, k) = Sum_{d|n} phi(d) * A008284(n/d, k) for n >= 1, T(0, 0) = 1. Triangle read by rows for 0 <= k <= n.

Original entry on oeis.org

1, 0, 1, 0, 2, 1, 0, 3, 1, 1, 0, 4, 3, 1, 1, 0, 5, 2, 2, 1, 1, 0, 6, 6, 4, 2, 1, 1, 0, 7, 3, 4, 3, 2, 1, 1, 0, 8, 8, 6, 6, 3, 2, 1, 1, 0, 9, 6, 9, 6, 5, 3, 2, 1, 1, 0, 10, 11, 10, 10, 8, 5, 3, 2, 1, 1, 0, 11, 5, 10, 11, 10, 7, 5, 3, 2, 1, 1, 0, 12, 17, 19, 19, 14, 12, 7, 5, 3, 2, 1, 1
Offset: 0

Views

Author

Peter Luschny, Aug 24 2019

Keywords

Comments

Dirichlet convolution of phi(n) and A008284(n,k) for n >= 1. - Richard L. Ollerton, May 07 2021

Examples

			Triangle starts:
[0] [1]
[1] [0, 1]
[2] [0, 2, 1]
[3] [0, 3, 1, 1]
[4] [0, 4, 3, 1, 1]
[5] [0, 5, 2, 2, 1, 1]
[6] [0, 6, 6, 4, 2, 1, 1]
[7] [0, 7, 3, 4, 3, 2, 1, 1]
[8] [0, 8, 8, 6, 6, 3, 2, 1, 1]
[9] [0, 9, 6, 9, 6, 5, 3, 2, 1, 1]
		

Crossrefs

Cf. A008284, A000010, A078392 (row sums), A282750.
Cf. A000041 (where reversed rows converge to).
T(2n,n) gives A052810.

Programs

  • SageMath
    def DivisorTriangle(f, T, Len, w = None):
        D = [[1]]
        for n in (1..Len-1):
            r = lambda k: [f(d)*T(n//d,k) for d in divisors(n)]
            L = [sum(r(k)) for k in (0..n)]
            if w != None: L = [*map(lambda v: v * w(n), L)]
            D.append(L)
        return D
    DivisorTriangle(euler_phi, A008284, 10)

Formula

From Richard L. Ollerton, May 07 2021: (Start)
For n >= 1, T(n,k) = Sum_{i=1..n} A008284(gcd(n,i),k).
For n >= 1, T(n,k) = Sum_{i=1..n} A008284(n/gcd(n,i),k)*phi(gcd(n,i))/phi(n/gcd(n,i)). (End)

A319301 Sum of GCDs of strict integer partitions of n.

Original entry on oeis.org

1, 2, 4, 5, 7, 10, 11, 14, 18, 21, 22, 33, 30, 39, 49, 54, 54, 78, 72, 100, 110, 121, 126, 181, 174, 207, 238, 284, 284, 389, 370, 466, 512, 582, 647, 806, 796, 954, 1066, 1265, 1300, 1616, 1652, 1979, 2192, 2452, 2636, 3202, 3336, 3892, 4237, 4843, 5172, 6090
Offset: 1

Views

Author

Gus Wiseman, Sep 16 2018

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n, i, r) option remember; `if`(i*(i+1)/2 `if`(i b(n$2, 0):
    seq(a(n), n=1..61);  # Alois P. Heinz, Mar 17 2019
  • Mathematica
    Table[Sum[GCD@@ptn,{ptn,Select[IntegerPartitions[n],UnsameQ@@#&]}],{n,30}]
    (* Second program: *)
    b[n_, i_, r_] := b[n, i, r] = If[i(i+1)/2 < n, 0,
         With[{t = GCD[i, r]}, If[i < n, b[n - i, Min[i - 1, n - i], t], 0] +
         If[i == n, t, 0] + b[n, i - 1, r]]];
    a[n_] := b[n, n, 0];
    Array[a, 61] (* Jean-François Alcover, May 20 2021, after Alois P. Heinz *)

Formula

From Richard L. Ollerton, May 06 2021: (Start)
a(n) = Sum_{d|n} A000010(n/d)*A000009(d).
a(n) = Sum_{k=1..n} A000009(gcd(n,k)).
a(n) = Sum_{k=1..n} A000009(n/gcd(n,k))*A000010(gcd(n,k))/A000010(n/gcd(n,k)). (End)

A258171 a(n) = Sum_{d|n} phi(d)*Bell(n/d) for n>0, a(0) = 0.

Original entry on oeis.org

0, 1, 3, 7, 19, 56, 214, 883, 4163, 21163, 116039, 678580, 4213848, 27644449, 190900217, 1382958677, 10480146333, 82864869820, 682076827740, 5832742205075, 51724158351527, 474869816158547, 4506715739125923, 44152005855084368, 445958869299027638
Offset: 0

Views

Author

Alois P. Heinz, May 22 2015

Keywords

Comments

Dirichlet convolution of phi(n) (A000010) and the Bell numbers (A000110) (n >= 1). - Richard L. Ollerton, May 09 2021

Crossrefs

Row sums of A258170.
Similar: A078392 (numbpart), this sequence (bell), A053635 (numbcomb), A181847 and A034738 (numbcomp), A327030 (numbperm).

Programs

  • Maple
    with(numtheory):
    A:= proc(n, k) option remember;
          add(phi(d)*k^(n/d), d=divisors(n))
        end:
    T:= (n, k)-> add((-1)^(k-i)*binomial(k, i)*A(n, i), i=0..k)/k!:
    a:= n-> add(T(n, k), k=0..n):
    seq(a(n), n=0..30);
  • Mathematica
    a[n_] := If[n == 0, 0, DivisorSum[n, EulerPhi[#] BellB[n/#] &]];
    Table[a[n], {n, 0, 25}] (* Peter Luschny, Aug 27 2019 *)

Formula

a(n) = Sum_{k=0..n} A258170(n,k).
For n >= 1, a(n) = Sum_{k=1..n} Bell(gcd(n,k)). - Richard L. Ollerton, May 09 2021

Extensions

New name from Peter Luschny, Aug 27 2019

A168534 Triangle read by rows, A168532 * A000012; as infinite lower triangular matrices.

Original entry on oeis.org

1, 2, 1, 3, 1, 1, 5, 2, 1, 1, 7, 1, 1, 1, 1, 11, 4, 2, 1, 1, 1, 15, 1, 1, 1, 1, 1, 1, 22, 5, 2, 2, 1, 1, 1, 1, 30, 3, 3, 1, 1, 1, 1, 1, 1, 42, 8, 2, 2, 2, 1, 1, 1, 1, 1, 56, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 77, 14, 7, 4, 2, 2, 1, 1, 1, 1, 1, 1
Offset: 1

Views

Author

Gary W. Adamson, Nov 28 2009

Keywords

Comments

Row sums = A078392: (1, 3, 5, 9, 11, 20, 21,...).
Triangle A168533 = A000012 * A168532
Left border = the partition numbers, A000041 starting with offset 1.

Examples

			First few rows of the triangle =
1;
2, 1;
3, 1, 1;
5, 2, 1, 1;
7, 1, 1, 1, 1;
11, 4, 2, 1, 1, 1;
15, 1, 1, 1, 1, 1, 1;
22, 5, 2, 2, 1, 1, 1, 1;
30, 3, 3, 1, 1, 1, 1, 1, 1;
42, 8, 2, 2, 2, 1, 1, 1, 1, 1;
56, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1;
77, 14, 7, 4, 2, 2, 1, 1, 1, 1, 1, 1;
101, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1;
135, 16, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1;
176, 9, 9, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
231, 22, 5, 5, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1;
...
		

Crossrefs

Formula

Triangle read by rows, A168532 * A000012; where A000012 = an infinite lower
triangular matrix with all 1's. The operation takes partial row sums
starting from the right of each row.

A319299 Irregular triangle where T(n,k) is the number of integer partitions of n with GCD equal to the k-th divisor of n.

Original entry on oeis.org

1, 1, 1, 2, 1, 3, 1, 1, 6, 1, 7, 2, 1, 1, 14, 1, 17, 3, 1, 1, 27, 2, 1, 34, 6, 1, 1, 55, 1, 63, 7, 3, 2, 1, 1, 100, 1, 119, 14, 1, 1, 167, 6, 2, 1, 209, 17, 3, 1, 1, 296, 1, 347, 27, 7, 2, 1, 1, 489, 1, 582, 34, 6, 3, 1, 1, 775, 14, 2, 1, 945, 55, 1, 1, 1254
Offset: 1

Views

Author

Gus Wiseman, Sep 16 2018

Keywords

Examples

			Triangle begins:
    1
    1   1
    2   1
    3   1   1
    6   1
    7   2   1   1
   14   1
   17   3   1   1
   27   2   1
   34   6   1   1
   55   1
   63   7   3   2   1   1
  100   1
  119  14   1   1
  167   6   2   1
  209  17   3   1   1
  296   1
  347  27   7   2   1   1
  489   1
  582  34   6   3   1   1
		

Crossrefs

A regular version is A168532. Row lengths are A000005. Row sums are A000041. First column is A000837.

Programs

  • Maple
    # with table A000837 obtained from that sequence
    f:= proc(n) local D,d;
      D:= sort(convert(numtheory:-divisors(n),list),`>`);
      seq(A000837[d],d=D)
    end proc:
    map(f, [$1..60]); # Robert Israel, Jul 09 2020
  • Mathematica
    Table[Length[Select[IntegerPartitions[n],GCD@@#==k&]],{n,20},{k,Divisors[n]}]

Formula

T(n,k) = A000837(n/A027750(n,k)).

A327030 a(n) = Sum_{d|n} phi(d)*(n/d)! for n > 0, a(0) = 0.

Original entry on oeis.org

0, 1, 3, 8, 28, 124, 732, 5046, 40352, 362898, 3628932, 39916810, 479002388, 6227020812, 87178296258, 1307674368272, 20922789928384, 355687428096016, 6402373706092350, 121645100408832018, 2432902008180269152, 51090942171709450128, 1124000727777647596830
Offset: 0

Views

Author

Peter Luschny, Aug 27 2019

Keywords

Comments

Dirichlet convolution of phi(n) and n! (n >= 1). - Richard L. Ollerton, May 09 2021

Crossrefs

Similar: A078392 (numbpart), A258171 (bell), A053635 (numbcomb), A181847 and A034738 (numbcomp), this sequence (numbperm).

Programs

  • Magma
    [0] cat [&+[EulerPhi(d)*Factorial(n div d):d in Divisors(n)]:n in [1..22]]; // Marius A. Burtea, Nov 13 2019
    
  • Magma
    [0] cat [&+[Factorial(Gcd(n,i)):i in [1..n]]:n in [1..22]]; // Marius A. Burtea, Nov 13 2019
  • Maple
    with(numtheory); A327030 := n -> add(phi(d)*(n/d)!, d = divisors(n)):
    seq(A327030(n), n=0..22);
  • Mathematica
    a[0] = 0; a[n_] := DivisorSum[n, EulerPhi[#] * (n/#)! &]; Array[a, 23, 0] (* Amiram Eldar, May 24 2021 *)
  • PARI
    a(n) = if (n>0, sumdiv(n, d, eulerphi(d)*(n/d)!), 0); \\ Michel Marcus, Aug 28 2019
    

Formula

a(n) = Sum_{i=1..n} gcd(n,i)!. - Ridouane Oudra, Nov 13 2019
Showing 1-10 of 12 results. Next