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

A000837 Number of partitions of n into relatively prime parts. Also aperiodic partitions.

Original entry on oeis.org

1, 1, 1, 2, 3, 6, 7, 14, 17, 27, 34, 55, 63, 100, 119, 167, 209, 296, 347, 489, 582, 775, 945, 1254, 1481, 1951, 2334, 2980, 3580, 4564, 5386, 6841, 8118, 10085, 12012, 14862, 17526, 21636, 25524, 31082, 36694, 44582, 52255, 63260, 74170, 88931, 104302
Offset: 0

Views

Author

Keywords

Comments

Starting (1, 1, 2, 3, 6, 7, 14, ...), = row sums of triangle A137585. - Gary W. Adamson, Jan 27 2008
Triangle A168532 has aerated variants of this sequence in each column starting with offset 1, row sums = A000041. - Gary W. Adamson, Nov 28 2009
A partition is aperiodic iff its multiplicities are relatively prime, i.e., its Heinz number (A215366) is not a perfect power (A007916). - Gus Wiseman, Dec 19 2017
This sequence is monotonically increasing; each partition of n-1 can have a part of size 1 added to it to get a partition counted in a(n). - Franklin T. Adams-Watters, Jul 24 2020

Examples

			Of the 11 partitions of 6, we must exclude 6, 4+2, 3+3 and 2+2+2, so a(6) = 11 - 4 = 7.
For n=6, 2+2+1+1 is periodic because it can be written 2*(2+1), similarly 1+1+1+1+1+1, 3+3 and 2+2+2.
The a(6) = 7 partitions into relatively prime parts are (51), (411), (321), (3111), (2211), (21111), (111111). The a(6) = 7 aperiodic partitions are (6), (51), (42), (411), (321), (3111), (21111). - _Gus Wiseman_, Dec 19 2017
		

References

  • H. W. Gould, personal communication.

Crossrefs

Programs

  • Mathematica
    p[n_] := IntegerPartitions[n]; l[n_] := Length[p[n]]; g[n_, j_] := Apply[GCD, Part[p[n], j]]; h[n_] := Table[g[n, j], {j, 1, l[n]}]; Join[{1}, Table[Count[h[n], 1], {n, 1, 20}]]
    (* Clark Kimberling, Mar 09 2012 *)
    a[0] = 1; a[n_] := Sum[ MoebiusMu[n/d] * PartitionsP[d], {d, Divisors[n]}]; Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Oct 03 2013 *)
  • PARI
    N=66; x='x+O('x^N); gf=2+sum(n=1,N, (1/eta(x^n))*moebius(n)); Vec(gf) \\ Joerg Arndt, May 11 2013
    
  • PARI
    print1("1, "); for(n=1,46,my(s=0);forpart(X=n,s+=gcd(X)==1);print1(s,", ")) \\ Hugo Pfoertner, Mar 27 2020
    
  • Python
    from sympy import npartitions, mobius, divisors
    def a(n): return 1 if n==0 else sum(mobius(n//d)*npartitions(d) for d in divisors(n)) # Indranil Ghosh, Apr 26 2017

Formula

Möbius transform of A000041. - Christian G. Bower, Jun 11 2000
Product_{n>0} 1/(1-q^n) = 1 + Sum_{n>0} a(n)*q^n/(1-q^n). - Mamuka Jibladze, Nov 14 2015
a(n) ~ exp(Pi*sqrt(2*n/3)) / (4*n*sqrt(3)). - Vaclav Kotesovec, Jan 28 2019
a(n) <= p(n) <= a(n+1), where p(n) is the number of partitions of n (A000041). - Franklin T. Adams-Watters, Jul 24 2020

Extensions

Corrected and extended by David W. Wilson, Aug 15 1996
Additional name from Christian G. Bower, Jun 11 2000

A281113 Number of twice-factorizations of n. Number of ways to choose a postpositive factorization of each part of a postpositive factorization of n.

Original entry on oeis.org

1, 1, 3, 1, 3, 1, 6, 3, 3, 1, 9, 1, 3, 3, 15, 1, 9, 1, 9, 3, 3, 1, 23, 3, 3, 6, 9, 1, 12, 1, 28, 3, 3, 3, 32, 1, 3, 3, 23, 1, 12, 1, 9, 9, 3, 1, 58, 3, 9, 3, 9, 1, 23, 3, 23, 3, 3, 1, 41, 1, 3, 9, 66, 3, 12, 1, 9, 3, 12, 1, 84, 1, 3, 9, 9, 3, 12, 1, 58, 15, 3
Offset: 2

Views

Author

Gus Wiseman, Jan 14 2017

Keywords

Comments

A postpositive number is a positive integer other than 1. A postpositive factorization of n is a finite orderless sequence of postpositive numbers whose product is n.

Examples

			The a(20)=9 twice-factorizations are: ((20)), ((2*10)), ((4*5)), ((2*2*5)), ((2)*(10)), ((2)*(2*5)), ((4)*(5)), ((2*2)*(5)), ((2)*(2)*(5)).
Twice-factorizations of 32 organized by composite:
((2)(2)(2)(2)(2)) ((2)(2)(2)(2 2)) ((2)(2)(2 2 2)) ((2)(2 2)(2 2)) ((2)(2 2 2 2)) ((2 2)(2 2 2)) ((2 2 2 2 2))
((2)(2)(2)(4))    ((2)(2)(2 4))    ((2)(2 2)(4))   ((2)(4)(2 2))   ((2)(2 2 4))   ((2 2)(2 4))   ((4)(2 2 2))  ((2 2 2 4))
((2)(2)(8))       ((2)(2 8))       ((2 2)(8))      ((2 2 8))
((2)(4)(4))       ((2)(4 4))       ((4)(2 4))      ((2 4 4))
((2)(16))         ((2 16))
((4)(8))          ((4 8))
((32)).
Twice-factorizations of 32 organized by domain:
((2)(2)(2)(2)(2))
((2)(2)(2)(2 2)) ((2)(2)(2)(4))
((2)(2)(2 2 2))  ((2)(2)(2 4)) ((2)(2)(8))
((2)(2 2)(2 2))  ((2)(2 2)(4)) ((2)(4)(2 2)) ((2)(4)(4))
((2)(2 2 2 2))   ((2)(2 2 4))  ((2)(2 8))    ((2)(4 4))   ((2)(16))
((2 2)(2 2 2))   ((2 2)(2 4))  ((2 2)(8))    ((4)(2 2 2)) ((4)(2 4)) ((4)(8))
((2 2 2 2 2))    ((2 2 2 4))   ((2 2 8))     ((2 4 4))    ((2 16))   ((4 8)) ((32)).
		

Crossrefs

Cf. A001055(n) = number of factorizations of n, A050336(n) = number of orderless twice-factorizations of n, A162247(n) = factors of factorizations of n, A063834(n) = a(p^(n-1)), A007716, A269134, A281116.

Programs

  • Mathematica
    postfacs[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[postfacs[n/d],Min@@#>=d&]],{d,Rest[Divisors[n]]}]];
    twicefacs[n_]:=Join@@Tuples/@Map[postfacs,postfacs[n],{2}];
    Table[Length[twicefacs[n]],{n,2,24}]

A100953 Number of partitions of n into relatively prime parts such that multiplicities of parts are also relatively prime.

Original entry on oeis.org

1, 1, 0, 1, 2, 5, 5, 13, 14, 25, 28, 54, 54, 99, 105, 160, 192, 295, 315, 488, 546, 760, 890, 1253, 1404, 1945, 2234, 2953, 3459, 4563, 5186, 6840, 7909, 10029, 11716, 14843, 17123, 21635, 25035, 30981, 36098, 44581, 51370, 63259, 73223, 88739, 103048, 124752
Offset: 0

Views

Author

Vladeta Jovovic, Jan 11 2005

Keywords

Crossrefs

Programs

  • Maple
    read transforms : a000837 := [] : b000837 := fopen("b000837.txt",READ) : bfil := readline(b000837) : while StringTools[WordCount](bfil) > 0 do b := sscanf( bfil,"%d %d") ; a000837 := [op(a000837),op(2,b)] ; bfil := readline(b000837) ; od: fclose(b000837) ; a000837 := subsop(1=NULL,a000837) : a := MOBIUS(a000837) : for n from 1 to 120 do printf("%d, ",op(n,a)) ; od: # R. J. Mathar, Mar 12 2008
    # second Maple program:
    with(numtheory): with(combinat):
    b:= proc(n) option remember; `if`(n=0, 1, add(
           mobius(n/d)*numbpart(d), d=divisors(n)))
        end:
    a:= proc(n) option remember; `if`(n=0, 1, add(
           mobius(n/d)*b(d), d=divisors(n)))
        end:
    seq(a(n), n=0..60);  # Alois P. Heinz, Dec 19 2017
  • Mathematica
    Table[Length[Select[IntegerPartitions[n],And[GCD@@#===1,GCD@@Length/@Split[#]===1]&]],{n,20}] (* Gus Wiseman, Dec 19 2017 *)
    b[n_] := b[n] = If[n==0, 1, Sum[
         MoebiusMu[n/d]*PartitionsP[d], {d, Divisors[n]}]];
    a[n_] := a[n] = If[n==0, 1, Sum[
         MoebiusMu[n/d]*b[d], {d, Divisors[n]}]];
    a /@ Range[0, 60] (* Jean-François Alcover, May 21 2021, after Alois P. Heinz *)

Formula

Moebius transform of A000837.

Extensions

More terms from David Wasserman and R. J. Mathar, Mar 04 2008
a(0)=1 prepended by Alois P. Heinz, Dec 19 2017

A303362 Number of strict integer partitions of n with pairwise indivisible parts.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 3, 2, 3, 4, 5, 4, 6, 7, 7, 9, 11, 12, 13, 15, 17, 20, 23, 25, 27, 32, 35, 40, 45, 50, 55, 58, 67, 78, 84, 95, 101, 113, 124, 137, 153, 169, 180, 198, 219, 242, 268, 291, 319, 342, 374, 412, 450, 492, 535, 573, 632, 685, 746, 813, 868, 944
Offset: 1

Views

Author

Gus Wiseman, Apr 22 2018

Keywords

Examples

			The a(14) = 7 strict integer partitions are (14), (11,3), (10,4), (9,5), (8,6), (7,5,2), (7,4,3).
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],UnsameQ@@#&&Select[Tuples[#,2],UnsameQ@@#&&Divisible@@#&]==={}&]],{n,60}]
  • PARI
    lista(nn)={local(Cache=Map());
      my(excl=vector(nn, n, sumdiv(n, d, 2^(n-d))));
      my(a(n, m=n, b=0)=
         if(n==0, 1,
            while(m>n || bittest(b,0), m--; b>>=1);
            my(hk=[n, m, b], z);
            if(!mapisdefined(Cache, hk, &z),
              z = if(m, self()(n, m-1, b>>1) + self()(n-m, m, bitor(b, excl[m])), 0);
              mapput(Cache, hk, z)); z));
       for(n=1, nn, print1(a(n), ", "))
    } \\ Andrew Howroyd, Nov 02 2019

A303386 Number of aperiodic factorizations of n > 1.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 4, 1, 2, 2, 3, 1, 4, 1, 4, 2, 2, 1, 7, 1, 2, 2, 4, 1, 5, 1, 6, 2, 2, 2, 7, 1, 2, 2, 7, 1, 5, 1, 4, 4, 2, 1, 12, 1, 4, 2, 4, 1, 7, 2, 7, 2, 2, 1, 11, 1, 2, 4, 7, 2, 5, 1, 4, 2, 5, 1, 16, 1, 2, 4, 4, 2, 5, 1, 12, 3, 2, 1, 11, 2, 2, 2, 7, 1, 11, 2, 4, 2, 2, 2, 19, 1, 4, 4, 7, 1, 5, 1, 7, 5
Offset: 2

Views

Author

Gus Wiseman, Apr 23 2018

Keywords

Comments

An aperiodic factorization of n is a finite multiset of positive integers greater than 1 whose product is n and whose multiplicities are relatively prime.

Examples

			The a(36) = 7 aperiodic factorizations are (2*2*9), (2*3*6), (2*18), (3*3*4), (3*12), (4*9), and (36). Missing from this list are (2*2*3*3) and (6*6).
		

Crossrefs

Programs

  • Mathematica
    facs[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[facs[n/d],Min@@#>=d&]],{d,Rest[Divisors[n]]}]];
    Table[Length[Select[facs[n],GCD@@Length/@Split[#]===1&]],{n,2,100}]
  • PARI
    A001055(n, m=n) = if(1==n, 1, my(s=0); fordiv(n, d, if((d>1)&&(d<=m), s += A001055(n/d, d))); (s));
    A052409(n) = { my(k=ispower(n)); if(k, k, n>1); }; \\ From A052409
    A303386(n) = if(1==n,n,my(r); sumdiv(A052409(n),d, ispower(n,d,&r); moebius(d)*A001055(r))); \\ Antti Karttunen, Sep 25 2018

Formula

a(n) = Sum_{d|A052409(n)} mu(d) * A001055(n^(1/d)), where mu = A008683.

Extensions

More terms from Antti Karttunen, Sep 25 2018

A304714 Number of connected strict integer partitions of n.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 2, 2, 3, 2, 5, 2, 5, 5, 6, 5, 10, 6, 12, 12, 13, 14, 21, 17, 23, 26, 30, 31, 46, 38, 51, 55, 61, 70, 87, 85, 102, 116, 128, 138, 171, 169, 204, 225, 245, 272, 319, 334, 383, 429, 464, 515, 593, 629, 715, 790, 861, 950, 1082
Offset: 1

Views

Author

Gus Wiseman, May 17 2018

Keywords

Comments

Given a finite set S of positive integers greater than one, let G(S) be the simple labeled graph with vertex set S and edges between any two vertices with a common divisor. For example, G({6,14,15,35}) is a 4-cycle. A multiset S is said to be connected if G(S) is a connected graph.

Examples

			The a(19) = 6 strict integer partitions are (19), (9,6,4), (10,5,4), (10,6,3), (12,4,3), (8,6,3,2). Taking the normalized prime factors of each part (see A112798, A302242), we have the following connected multiset multisystems.
       (19): {{8}}
    (9,6,4): {{2,2},{1,2},{1,1}}
   (10,5,4): {{1,3},{3},{1,1}}
   (10,6,3): {{1,3},{1,2},{2}}
   (12,4,3): {{1,1,2},{1,1},{2}}
  (8,6,3,2): {{1,1,1},{1,2},{2},{1}}
		

Crossrefs

The Heinz numbers of these partitions are given by A328513.

Programs

  • Mathematica
    zsm[s_]:=With[{c=Select[Tuples[Range[Length[s]],2],And[Less@@#,GCD@@s[[#]]]>1&]},If[c==={},s,zsm[Union[Append[Delete[s,List/@c[[1]]],LCM@@s[[c[[1]]]]]]]]];
    Table[Length[Select[IntegerPartitions[n],UnsameQ@@#&&Length[zsm[#]]===1&]],{n,60}]

A316439 Irregular triangle where T(n,k) is the number of factorizations of n into k factors > 1, with k ranging from 1 to Omega(n).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 3, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 3, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 3, 1, 1, 1, 1, 1, 1, 1, 3, 2, 1, 1, 1, 3
Offset: 1

Views

Author

Gus Wiseman, Jul 03 2018

Keywords

Examples

			The factorizations of 24 are (2*2*2*3), (2*2*6), (2*3*4), (2*12), (3*8), (4*6), (24) so the 24th row is {1, 3, 2, 1}.
Triangle begins:
  {}
  1
  1
  1  1
  1
  1  1
  1
  1  1  1
  1  1
  1  1
  1
  1  2  1
  1
  1  1
  1  1
  1  2  1  1
  1
  1  2  1
  1
  1  2  1
  1  1
  1  1
  1
  1  3  2  1
  1  1
  1  1
  1  1  1
  1  2  1
  1
  1  3  1
		

Crossrefs

Cf. A001222 (row lengths), A001055 (row sums), A001970, A007716, A045778, A162247, A259936, A281116, A303386.

Programs

  • Maple
    g:= proc(n, k) option remember; `if`(n>k, 0, x)+
          `if`(isprime(n), 0, expand(x*add(`if`(d>k, 0,
          g(n/d, d)), d=numtheory[divisors](n) minus {1, n})))
        end:
    T:= n-> `if`(n=1, [][], (p-> seq(coeff(p, x, i)
            , i=1..degree(p)))(g(n$2))):
    seq(T(n), n=1..50);  # Alois P. Heinz, Aug 11 2019
  • Mathematica
    facs[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[facs[n/d],Min@@#>=d&]],{d,Rest[Divisors[n]]}]];
    Table[Length[Select[facs[n],Length[#]==k&]],{n,100},{k,PrimeOmega[n]}]

A286520 Number of finite connected sets of pairwise indivisible positive integers greater than one with least common multiple n.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 3, 1, 1, 1, 2, 1, 5, 1, 1, 1, 1, 1, 5, 1, 1, 1, 3, 1, 5, 1, 2, 2, 1, 1, 4, 1, 2, 1, 2, 1, 3, 1, 3, 1, 1, 1, 17, 1, 1, 2, 1, 1, 5, 1, 2, 1, 5, 1, 9, 1, 1, 2, 2, 1, 5, 1, 4, 1, 1, 1, 17, 1, 1, 1
Offset: 2

Views

Author

Gus Wiseman, Jul 24 2017

Keywords

Comments

Given a finite set S of positive integers greater than one, let G(S) be the simple labeled graph with vertex set S and edges between any two vertices that are not relatively prime. For example, G({6,14,15,35}) is a 4-cycle. A set S is said to be connected if G(S) is a connected graph.

Examples

			The a(30)=5 sets are: {30}, {6,10}, {6,15}, {10,15}, {6,10,15}.
		

Crossrefs

Programs

  • Mathematica
    zsm[s_]:=With[{c=Select[Tuples[Range[Length[s]],2],And[Less@@#,GCD@@s[[#]]]>1&]},If[c==={},s,zsm[Union[Append[Delete[s,List/@c[[1]]],LCM@@s[[c[[1]]]]]]]]];
    Table[Length[Select[Subsets[Rest[Divisors[n]]],And[!MemberQ[Tuples[#,2],{x_,y_}/;And[x
    				

A286518 Number of finite connected sets of positive integers greater than one with least common multiple n.

Original entry on oeis.org

1, 1, 1, 2, 1, 4, 1, 4, 2, 4, 1, 20, 1, 4, 4, 8, 1, 20, 1, 20, 4, 4, 1, 88, 2, 4, 4, 20, 1, 96, 1, 16, 4, 4, 4, 196, 1, 4, 4, 88, 1, 96, 1, 20, 20, 4, 1, 368, 2, 20, 4, 20, 1, 88, 4, 88, 4, 4, 1, 1824, 1, 4, 20, 32, 4, 96, 1, 20, 4, 96, 1, 1688, 1, 4, 20, 20, 4, 96, 1, 368, 8, 4, 1, 1824, 4, 4, 4, 88, 1, 1824, 4, 20
Offset: 1

Views

Author

Gus Wiseman, Jul 24 2017

Keywords

Comments

Given a finite set S of positive integers greater than one, let G(S) be the simple labeled graph with vertex set S and edges between any two vertices that are not relatively prime. For example, G({6,14,15,35}) is a 4-cycle. A set S is said to be connected if G(S) is a connected graph.
a(n) depends only on prime signature of n (cf. A025487). - Antti Karttunen, Feb 17 2024

Examples

			The a(6)=4 sets are: {6}, {2,6}, {3,6}, {2,3,6}.
		

Crossrefs

Programs

  • Mathematica
    zsm[s_]:=With[{c=Select[Tuples[Range[Length[s]],2],And[Less@@#,GCD@@s[[#]]]>1&]},If[c==={},s,zsm[Union[Append[Delete[s,List/@c[[1]]],LCM@@s[[c[[1]]]]]]]]];
    Table[Length[Select[Subsets[Rest[Divisors[n]]],zsm[#]==={n}&]],{n,2,20}]
  • PARI
    isconnected(facs) = { my(siz=length(facs)); if(1==siz,1,my(m=matrix(siz,siz,i,j,(gcd(facs[i],facs[j])!=1))^siz); for(n=1,siz,if(0==vecmin(m[n,]),return(0))); (1)); };
    A286518aux(n, parts, from=1, ss=List([])) = { my(k = #parts, s=0, newss); if(lcm(Vec(ss))==n && isconnected(ss), s++); for(i=from, k, newss = List(ss); listput(newss, parts[i]); s += A286518aux(n, parts, i+1, newss)); (s) };
    A286518(n) = if(1==n, n, A286518aux(n, divisors(n))); \\ Antti Karttunen, Feb 17 2024

Formula

From Antti Karttunen, Feb 17 2024: (Start)
a(n) <= A069626(n).
It seems that a(n) >= A318670(n), for all n > 1.
(End)

Extensions

Term a(1)=1 prepended and more terms added by Antti Karttunen, Feb 17 2024

A317757 Number of non-isomorphic multiset partitions of size n such that the blocks have empty intersection.

Original entry on oeis.org

1, 0, 1, 4, 17, 56, 205, 690, 2446, 8506, 30429, 109449, 402486, 1501424, 5714194, 22132604, 87383864, 351373406, 1439320606, 6003166059, 25488902820, 110125079184, 483987225922, 2162799298162, 9823464989574, 45332196378784, 212459227340403, 1010898241558627, 4881398739414159
Offset: 0

Views

Author

Gus Wiseman, Aug 06 2018

Keywords

Examples

			Non-isomorphic representatives of the a(4) = 17 multiset partitions:
  {1}{234},{2}{111},{2}{113},{11}{22},{11}{23},{12}{34},
  {1}{1}{22},{1}{1}{23},{1}{2}{11},{1}{2}{12},{1}{2}{13},{1}{2}{34},{2}{3}{11},
  {1}{1}{1}{2},{1}{1}{2}{2},{1}{1}{2}{3},{1}{2}{3}{4}.
		

Crossrefs

Programs

  • Mathematica
    sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
    mps[set_]:=Union[Sort[Sort/@(#/.x_Integer:>set[[x]])]&/@sps[Range[Length[set]]]];
    strnorm[n_]:=Flatten[MapIndexed[Table[#2,{#1}]&,#]]&/@IntegerPartitions[n];
    sysnorm[m_]:=If[Union@@m!=Range[Max@@Flatten[m]],sysnorm[m/.Rule@@@Table[{(Union@@m)[[i]],i},{i,Length[Union@@m]}]],First[Sort[sysnorm[m,1]]]];sysnorm[m_,aft_]:=If[Length[Union@@m]<=aft,{m},With[{mx=Table[Count[m,i,{2}],{i,Select[Union@@m,#>=aft&]}]},Union@@(sysnorm[#,aft+1]&/@Union[Table[Map[Sort,m/.{par+aft-1->aft,aft->par+aft-1},{0,1}],{par,First/@Position[mx,Max[mx]]}]])]];
    Table[Length[Union[sysnorm/@Join@@Table[Select[mps[m],Intersection@@#=={}&],{m,strnorm[n]}]]],{n,6}]
  • PARI
    EulerT(v)={Vec(exp(x*Ser(dirmul(v, vector(#v, n, 1/n))))-1, -#v)}
    permcount(v) = {my(m=1, s=0, k=0, t); for(i=1, #v, t=v[i]; k=if(i>1&&t==v[i-1], k+1, 1); m*=t*k; s+=t); s!/m}
    K(q, t, k)={EulerT(Vec(sum(j=1, #q, gcd(t, q[j])*x^lcm(t, q[j])) + O(x*x^k), -k))}
    R(q, n)={vector(n, t, x*Ser(K(q, t, n)/t))}
    a(n)={my(s=0); forpart(q=n, my(f=prod(i=1, #q, 1 - x^q[i]), u=R(q,n)); s+=permcount(q)*sum(k=0, n, my(c=polcoef(f,k)); if(c, c*polcoef(exp(sum(t=1, n\(k+1), x^(t*k)*u[t], O(x*x^n) ))/if(k,1-x^k,1), n))) ); s/n!} \\ Andrew Howroyd, May 30 2023

Extensions

a(8)-a(10) from Gus Wiseman, Sep 27 2018
a(0)=1 prepended and terms a(11) and beyond from Andrew Howroyd, May 30 2023
Showing 1-10 of 107 results. Next