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

A032198 "CIK" (necklace, indistinct, unlabeled) transform of 1,2,3,4,...

Original entry on oeis.org

1, 3, 6, 13, 25, 58, 121, 283, 646, 1527, 3601, 8678, 20881, 50823, 124054, 304573, 750121, 1855098, 4600201, 11442085, 28527446, 71292603, 178526881, 447919418, 1125750145, 2833906683, 7144450566, 18036423973
Offset: 1

Views

Author

Keywords

Examples

			From _Petros Hadjicostas_, Jan 07 2018: (Start)
We give some examples to illustrate the theory of C. G. Bower about transforms given in the weblink above. We assume we have boxes of different sizes and colors that we place on a circle to form a necklace. Two boxes of the same size and same color are considered identical (indistinct and unlabeled). We do, however, change the roles of the sequences (a(n): n>=1) and (b(n): n>=1) that appear in the weblink above. We assume (a(n): n>=1) = CIK((b(n): n>=1)).
Since b(1) = 1, b(2) = 2, b(3) = 3, etc., a box that can hold 1 ball only can be of 1 color only, a box that can hold 2 balls only can be one of 2 colors only, a box that can hold 3 balls can be one of 3 colors, and so on.
To prove that a(3) = 6, we consider three cases. In the first case, we have a single box that can hold 3 balls, and thus we have 3 possibilities for the 3 colors the box can be. In the second case, we have a box that can hold 2 balls and a box that can hold 1 ball. Here, we have 2 x 1 = 2 possibilities. In the third case, we have 3 identical boxes, each of which can hold 1 ball. This gives rise to 1 possibility. Hence, a(3) = 3 + 2 + 1 = 6.
To prove that a(4) = 13, we consider 5 cases: a box with 4 balls (4 possibilities), one box with 3 balls and one box with 1 ball (3 possibilities), two identical boxes each with 2 balls (3 possibilities), one box with 2 balls and two identical boxes each with 1 ball (2 possibilities), and four identical boxes each with 1 ball (1 possibility). Thus, a(4) = 4 + 3 + 3 + 2 + 1 = 13.
(End)
		

Crossrefs

Programs

  • Mathematica
    nmax = 30;
    f[x_] = Sum[n*x^n, {n, 1, nmax}];
    gf = Sum[(EulerPhi[n]/n)*Log[1/(1 - f[x^n])] + O[x]^nmax, {n, 1, nmax}]/x;
    CoefficientList[gf, x] (* Jean-François Alcover, Jul 29 2018, after Joerg Arndt *)
  • PARI
    N = 66;  x = 'x + O('x^N);
    f(x)=sum(n=1, N, n*x^n );
    gf = sum(n=1, N, eulerphi(n)/n*log(1/(1-f(x^n)))  );
    v = Vec(gf)
    /* Joerg Arndt, Jan 21 2013 */

Formula

a(n) = 1/n*Sum_{d divides n} phi(n/d)*A004146(d). - Vladeta Jovovic, Feb 15 2003
From Petros Hadjicostas, Jan 07 2018: (Start)
a(n) = -2 + (1/n)*Sum_{d|n} phi(n/d)*A005248(d) = -2 + (1/n)*Sum_{d|n} phi(n/d)*L(2*d), where L(n) = A000032(n) is the usual Lucas sequence.
G.f.: -Sum_{n >= 1} (phi(n)/n)*log(1 - B(x^n)), where B(x) = x + 2*x^2 + 3*x^3 + 4*x^4 + ... = x/(1-x)^2.
G.f.: -2*x/(1 - x) - Sum_{n>=1} (phi(n)/n)*log(1 - 3*x^n + x^(2*n)).
(End)
From Petros Hadjicostas, Jun 19 2019: (Start)
According to Gibson et al. (2018), a(n) is the number of m-color cyclic compositions of n where each part of size m has m possible colors. This is nothing else than the CIK transform of the sequence 1, 2, 3, 4, ...
Using the theory of Flajolet and Soria (1991), Gibson et al. (2018, Eq. (1.1)) proved that the g.f. of a(n) is Sum_{s >= 1} (phi(s)/s) * log((1 - x^s)^2/(1 - 3*x^s + x^(2*s))), which is exactly the same g.f. as the ones above.
Gibson et al. (2018, p. 3210) also proved that a(n) ~ (2/(3-sqrt(5)))^n/n for large n. See also Chapter 3 in Gibson (2017).
(End)

A308747 Number of achiral m-color cyclic compositions of n (that is, number of cyclic compositions of n with reflection symmetry where each part of size m can be colored with one of m colors).

Original entry on oeis.org

1, 3, 6, 13, 23, 44, 73, 131, 210, 365, 575, 984, 1537, 2611, 4062, 6877, 10679, 18052, 28009, 47315, 73386, 123933, 192191, 324528, 503233, 849699, 1317558, 2224621, 3449495, 5824220, 9030985, 15248099, 23643522, 39920141, 61899647, 104512392, 162055489, 273617107
Offset: 1

Views

Author

Petros Hadjicostas, Jun 21 2019

Keywords

Comments

Cyclic compositions of a positive integer n are equivalence classes of ordered partitions of n such that two such partitions are equivalent if one can be obtained from the other by rotation. These were first studied by Sommerville (1909).
Symmetric cyclic compositions or circular palindromes or achiral cyclic compositions are those cyclic compositions that have at least one axis of symmetry. They were also studied by Sommerville (1909, pp. 301-304).
Let (c(m): m >= 1) be the input sequence and let b = (b(n): n >= 1) be the output sequence under the CPAL (circular palindrome) transform of c; that is, b(n) = (CPAC c)n for n >= 1. Hence, b(n) is the number of symmetric cyclic compositions of n where a part of size m can be colored with one of c(m) colors. If C(x) = Sum{m >= 1} c(m)*x^m is the g.f. of the input sequence c, then the g.f. of b = (CPAL c) is Sum_{n >= 1} b(n)*x^n = (1 + C(x))^2/(2 * (1 - C(x^2))) - (1/2).
For the current sequence, the input sequence is c(m) = m for m >= 1, and we are dealing with the so-called "m-color" compositions. m-color linear compositions were studied by Agarwal (2000), whereas m-color cyclic compositions were studied by Gibson (2017) and Gibson et al. (2018).
Thus, for the current sequence, a(n) is the number of symmetric (achiral) cyclic compositions of n where a part of size m may be colored with one of m colors (for each m >= 1).
The function A(x) = (exp(Pi*(x + 1)*I)*phi^(-x - 4) - exp(2*I*Pi*x)*phi^(4 - x) + exp(Pi*x*I)*phi^(x - 4) + phi^(x + 4))/sqrt(5) - 2*x, where phi is the golden ratio, shows that the sequence can be easily extended to all integers. - Peter Luschny, Aug 09 2020

Examples

			We have a(1) = 1 because we only have one symmetric cyclic composition of n = 1, namely 1_1 (and a part of size 1 can be colored with only one color).
We have a(2) = 3 because we have the following colored achiral cyclic compositions of n = 2: 2_1, 2_2, 1_1 + 1_1.
We have a(3) = 6 because we have the following colored achiral cyclic compositions of n = 3: 3_1, 3_2, 3_3, 1_1 + 2_1, 1_1 + 2_2, 1_1 + 1_1 + 1_1.
We have a(4) = 13 because we have the following colored achiral cyclic compositions of n = 4: 4_1, 4_2, 4_3, 4_4, 1_1 + 3_1, 1_1 + 3_2, 1_1 + 3_3, 2_1 + 2_1, 2_1 + 2_2, 2_2 + 2_2, 1_1 + 2_1 + 1_1, 1_1 + 2_2 + 1_1, 1_1 + 1_1 + 1_1 + 1_1.
We have a(5) = 23 because we have the following colored achiral cyclic compositions of n = 5:
(i) with one part: 5_1, 5_2, 5_3, 5_4, 5_5;
(ii) with two parts: 1_1 + 4_1, 1_1 + 4_2, 1_1 + 4_3, 1_1 + 4_4, 2_1 + 3_1, 2_1 + 3_2, 2_1 + 3_3, 2_2 + 3_1, 2_2 + 3_2, 2_2 + 3_3;
(iii) with three parts: 1_1 + 3_1 + 1_1, 1_1 + 3_2 + 1_1, 1_1 + 3_3 + 1_1, 2_1 + 1_1 + 2_1, 2_2 + 1_1 + 2_2;
(iv) with four parts: 1_1 + 1_1 + 2_1 + 1_1, 1_1 + 1_1 + 2_2 + 1_1 (here, the axis of symmetry passes through one of the 1's and through 2);
(v) with five parts: 1_1 + 1_1 + 1_1 + 1_1 + 1_1.
		

Crossrefs

Formula

CPAL (circular palindrome) transform of 1, 2, 3, 4, ...
a(n) = 2*a(n - 1) + 2*a(n - 2) - 6*a(n - 3) + 2*a(n - 4) + 2*a(n - 5) - a(n - 6) for n >= 7 with a(1) = 1, a(2) = 3, a(3) = 6, a(4) = 13, a(5) = 23, and a(6) = 44.
a(n) = 3*a(n - 2) - a(n - 4) + 2*(n - 2) for n >= 5 with a(1) = 1, a(2) = 3, a(3) = 6, and a(4) = 13.
a(n) = Fib(n + 4) + (-1)^n * Fib(n - 4) - 2*n for n >= 4, where Fib(n) = A000045(n).
G.f.: x * (1 + x - 2*x^2 + x^3 + x^4)/((1 - x)^2 * (1 - x - x^2) * (1 + x - x^2)).

A307415 Total number of parts in all symmetric m-color cyclic compositions of n (that is, the total number of parts in all achiral cyclic compositions of n where a part with size m can be colored with one of m colors).

Original entry on oeis.org

1, 4, 10, 26, 53, 116, 215, 434, 766, 1480, 2539, 4776, 8045, 14864, 24722, 45094, 74305, 134236, 219619, 393790, 640646, 1141844, 1849175, 3279696, 5291353, 9346396, 15031450, 26458994, 42438221, 74479940, 119182319, 208629386, 333170830, 581904544, 927617347, 1616924664
Offset: 1

Views

Author

Petros Hadjicostas, Jun 24 2019

Keywords

Comments

Cyclic compositions of a positive integer n are equivalence classes of ordered partitions of n such that two such partitions are equivalent if one can be obtained from the other by rotation. These were first studied by Sommerville (1909).
Symmetric cyclic compositions or circular palindromes or achiral cyclic compositions are those cyclic compositions that have at least one axis of symmetry. They were also studied by Sommerville (1909, pp. 301-304).
Let c = (c(m): m >= 1) be the input sequence and let b_k = (b_k(n): n >= 1) be the output sequence under Bower's CPAL[k] (circular palindrome with k boxes) transform of c; that is, b_k(n) = (CPAC[k] c)n for n >= 1. Hence, b_k(n) is the number of symmetric cyclic compositions of n with k parts, where a part of size m can be colored with one of c(m) colors. If C(x) = Sum{m >= 1} c(m)*x^m is the g.f. of the input sequence c, then the bivariate g.f. of the list of sequences (b_k: k >= 1) = ((CPAL[k] c): k >= 1) = ((b_k(n): n >= 1): k >= 1) is Sum_{n,k >= 1} b_k(n)*x^n*y^k = (1 + y*C(x))^2/(2 * (1 - y^2*C(x^2))) - (1/2).
Here, Sum_{k=1..n} k*b_k(n) is the total number of parts in all symmetric colored cyclic compositions of n (where the coloring of parts is done according to the input sequence c). To find the g.f. of the sequence (Sum_{k=1..n} k*b_k(n): n >= 1), we differentiate the above bivariate g.f. (i.e., Sum_{n,k >= 1} b_k(n)*x^n*y^k) w.r.t. y and set y = 1. We get (1 + C(x)) * (C(x) + C(x^2))/(1 - C(x^2))^2.
For the current sequence, the input sequence is c(m) = m for m >= 1, and we are dealing with the so-called "m-color" compositions. m-color linear compositions were studied by Agarwal (2000), whereas m-color cyclic compositions were studied by Gibson (2017) and Gibson et al. (2018).
Thus, for the current sequence, a(n) is the total number of parts in all symmetric (achiral) m-color cyclic compositions of n (where a part of size m may be colored with one of m colors). Since C(x) = x/(1 - x)^2, we get that (1 + C(x)) * (C(x) + C(x^2))/(1 - C(x^2))^2 = (x^2 - x + 1) * x * (x^2 + 3*x + 1) * (x + 1)^2/((x^2 + x - 1)^2 * (x^2 - x - 1)^2).
The roots of the denominator (x^2 + x - 1)^2 * (x^2 - x - 1)^2 are phi, -phi, 1/phi, -1/phi, where phi = (1 + sqrt(5))/2 = A001622 is the golden ratio. Each of these roots is double, so a(n) = (c_1 + d_1*n) * phi^n + (c_2 + d_2*n) * (-phi)^n + (c_3 + d_3*n) * (1/phi)^n + (c_4 + d_4*n) * (-1/phi)^n, and the constants c_i, d_i (i = 1, 2, 3, 4) can be determined from the first eight terms of (a(n): n >= 1). Since, however, the Fibonacci numbers (A000045(n): n >= 0) can be expressed in terms of phi, after some tedious algebra, we may derive the formula given below.

Examples

			We have a(1) = 1 because we only have one symmetric cyclic composition of n = 1, namely 1_1, which has 1 part.
We have a(2) = 4 because we have the following colored achiral cyclic compositions of n = 2: 2_1, 2_2, 1_1 + 1_1; hence, a(2) = 1 + 1 + 2 = 4.
We have a(3) = 10 because we have the following colored achiral cyclic compositions of n = 3: 3_1, 3_2, 3_3, 1_1 + 2_1, 1_1 + 2_2, 1_1 + 1_1 + 1_1; hence, a(3) = 1 + 1 + 1 + 2 + 2 + 3 = 10.
We have a(4) = 26 because we have the following colored achiral cyclic compositions of n = 4: 4_1, 4_2, 4_3, 4_4, 1_1 + 3_1, 1_1 + 3_2, 1_1 + 3_3, 2_1 + 2_1, 2_1 + 2_2, 2_2 + 2_2, 1_1 + 2_1 + 1_1, 1_1 + 2_2 + 1_1, 1_1 + 1_1 + 1_1 + 1_1; hence, a(4) = 1 + 1 + 1 + 1 + 2 + 2 + 2 + 2 + 2 + 2 + 3 + 3 + 4 = 26.
We have a(5) = 53 because we have the following colored achiral cyclic compositions of n = 5:
(i) With one part: 5_1, 5_2, 5_3, 5_4, 5_5; i.e., a total of 5 parts.
(ii) With two parts: 1_1 + 4_1, 1_1 + 4_2, 1_1 + 4_3, 1_1 + 4_4, 2_1 + 3_1, 2_1 + 3_2, 2_1 + 3_3, 2_2 + 3_1, 2_2 + 3_2, 2_2 + 3_3; i.e., a total of 20 parts.
(iii) With three parts: 1_1 + 3_1 + 1_1, 1_1 + 3_2 + 1_1, 1_1 + 3_3 + 1_1, 2_1 + 1_1 + 2_1, 2_2 + 1_1 + 2_2; i.e., a total of 15 parts.
(iv) With four parts: 1_1 + 1_1 + 2_1 + 1_1, 1_1 + 1_1 + 2_2 + 1_1 (here, the axis of symmetry passes through one of the 1's and through 2); i.e., a total of 8 parts.
(v) With five parts: 1_1 + 1_1 + 1_1 + 1_1 + 1_1; i.e., a total of 5 parts.
Thus, a(5) = 5 + 20 + 15 + 8 + 5 = 53.
		

Crossrefs

Formula

a(n) = (n/5) * (11*F(n) + 7*F(n-1)) + (-1)^n * (n/5) * (-4*F(n) + 7*F(n-1)) - (2/5) * (5*F(n+1) + 3*F(n)) - (-1)^n * (2/5) * (3*F(n) - 5*F(n-1)) for n >= 1, where F(n) = A000045(n) is the n-th Fibonacci number.
G.f.: (x^2 - x + 1) * x * (x^2 + 3*x + 1) * (x + 1)^2/((x^2 + x - 1)^2 * (x^2 - x - 1)^2).

A032278 Number of ways to partition n elements into pie slices each with at least 2 elements allowing the pie to be turned over.

Original entry on oeis.org

0, 1, 1, 2, 2, 4, 4, 7, 8, 13, 15, 25, 30, 48, 63, 98, 132, 208, 290, 454, 656, 1021, 1509, 2358, 3544, 5535, 8441, 13200, 20318, 31835, 49352, 77435, 120710, 189673, 296853, 467159, 733362, 1155646, 1818593, 2869377, 4524080
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A000005, A027750, A032190 (CIK, pie not to be turned over).

Programs

  • Maple
    A032278_list := proc(n)
        local ele ;
        ele := [0,seq(1,i=1..30)] ;
        DIK(ele) ; # defined in A032287
    end proc:
    A032278_list(50) ; # R. J. Mathar, Feb 14 2025
  • PARI
    seq(n)={Vec(x^2/((1-x)*(1-x^2-x^4)) + sum(d=1, n, eulerphi(d)/d*log((1-x^d)/(1-x^d-x^(2*d)) + O(x*x^n))), -n)/2} \\ Andrew Howroyd, Jun 20 2018

Formula

"DIK" (bracelet, indistinct, unlabeled) transform of 0, 1, 1, 1, ...
G.f.: (x^2/((1 - x)*(1 - x^2 - x^4)) + Sum_{d>0} phi(d)*log((1 - x^d)/(1 - x^d - x^(2*d)))/d)/2. - Andrew Howroyd, Jun 20 2018

A308817 Total number of parts in all m-color dihedral compositions of n (that is, the total number of parts in all dihedral compositions of n where a part of size m may be colored with one of m colors).

Original entry on oeis.org

1, 4, 10, 26, 56, 138, 299, 726, 1686, 4158, 10130, 25678, 64725, 166538, 428456, 1112226, 2888604, 7533750, 19653903, 51367462, 134277878, 351284164, 919080550, 2405427698, 6295780309, 16480373968, 43141303978, 112939105716, 295664584064, 774042041090, 2026429360115, 5305210333758
Offset: 1

Views

Author

Petros Hadjicostas, Jun 26 2019

Keywords

Comments

Cyclic compositions of a positive integer n are equivalence classes of ordered partitions of n such that two such partitions are equivalent iff one can be obtained from the other by rotation. These were first studied by Sommerville (1909).
Symmetric cyclic compositions or circular palindromes or achiral cyclic compositions are those cyclic compositions that have at least one axis of symmetry. They were also studied by Sommerville (1909, pp. 301-304).
Dihedral compositions of a positive integer n are equivalence classes of ordered partitions of n such that two such partitions are equivalent iff one can be obtained from the other by rotation or reflection. See, for example, Knopfmacher and Robbins (2013).
The number of dihedral compositions of n (of any kind) is the average of the corresponding numbers of cyclic and symmetric cyclic compositions of n.
Let c = (c(m): m >= 1) be the input sequence and let b_k = (b_k(n): n >= 1) be the output sequence under Bower's DIK[k] ("bracelet, indistinct, unlabeled" with k boxes) transform of c; that is, b_k(n) = (DIK[k] c)n for n >= 1. Hence, b_k(n) is the number of dihedral compositions of n with k parts, where a part of size m can be colored with one of c(m) colors. If C(x) = Sum{m >= 1} c(m)*x^m is the g.f. of the input sequence c, then the bivariate g.f. of the list of sequences (b_k: k >= 1) = ((DIK[k] c): k >= 1) = ((b_k(n): n >= 1): k >= 1) is Sum_{n,k >= 1} b_k(n)*x^n*y^k = (1 + y * C(x))^2/(4 * (1 - y^2 * C(x^2))) - (1/4) - (1/2) * Sum_{d >= 1} (phi(d)/d) * log(1 - y^d * C(x^d)).
Here, Sum_{k=1..n} k*b_k(n) is the total number of parts in all colored dihedral compositions of n (where the coloring of parts is done according to the input sequence c). To find the g.f. of the sequence (Sum_{k=1..n} k*b_k(n): n >= 1), we differentiate the above bivariate g.f. (i.e., Sum_{n,k >= 1} b_k(n)*x^n*y^k) w.r.t. y and set y = 1. We get (1 + C(x)) * (C(x) + C(x^2))/(2 * (1 - C(x^2))^2) + (1/2) * Sum_{d >= 1} phi(d) * C(x^d)/(1 - C(x^d)).
For the current sequence, the input sequence is c(m) = m for m >= 1, and we are dealing with the so-called "m-color" compositions. m-color linear compositions were studied by Agarwal (2000), whereas m-color cyclic compositions were studied by Gibson (2017) and Gibson et al. (2018).
Thus, for the current sequence, a(n) is the total number of parts in all m-color dihedral compositions of n (where a part of size m may be colored with one of m colors). Since C(x) = x/(1 - x)^2, we get that (1 + C(x)) * (C(x) + C(x^2))/(2 * (1 - C(x^2))^2) + (1/2) * Sum_{d >= 1} phi(d) * C(x^d)/(1 - C(x^d)) = (1/2) * (x^2 - x + 1) * x * (x^2 + 3*x + 1) * (x + 1)^2/((x^2 + x - 1)^2 * (x^2 - x - 1)^2) + (1/2) * Sum_{s >= 1} phi(s) * x^s/(1 - 3*x^s + x^(2*s)).

Examples

			We have a(1) = 1 because 1_1 is the only m-color dihedral composition of n = 1 and the total number of parts is 1.
We have a(2) = 4 because 2_1, 2_2, 1_1 + 1_1 are all the m-color dihedral compositions of 2 and the total number of parts is 1 + 1 + 2 = 4.
We have a(3) = 10 because 3_1, 3_2, 3_3, 1_1 + 2_1, 1_1 + 2_2, 1_1 + 1_1 + 1_1 are all the m-color dihedral compositions of n = 3 and the total number of parts is 1 + 1 + 1 + 2 + 2 + 3 = 10.
We have a(4) = 26 because 4_1, 4_2, 4_3, 4_4, 1_1 + 3_1, 1_1 + 3_2, 1_1 + 3_3, 2_1 + 2_1, 2_1 + 2_2, 2_2 + 2_2, 1_1 + 2_1 + 1_1, 1_1 + 2_2 + 1_1, 1_1 + 1_1 + 1_1 + 1_1 are all the m-color dihedral compositions of n = 4 and the total number of parts is 1 + 1 + 1 + 1 + 2 + 2 + 2 + 2 + 2 + 2 + 3 + 3 + 4 = 26.
Note that a(n) = A307415(n) = A308723(n) for n = 1, 2, 3, 4 because all cyclic compositions of n when 1 <= n <= 4 are symmetric as well (and thus are dihedral).
For n = 5, we have A307415(5) = 53 <> 59 = A308723(5), in which case, a(n) = (53 + 59)/2 = 56. For example, 1_1 + 2_1 + 3_1 is a dihedral composition of n = 5, but it is not symmetric, so it corresponds to two (inequivalent) cyclic compositions: 1_1 + 2_1 + 3_1 and 3_1 + 2_1 + 1_1. Similarly, 1_1 + 2_1 + 2_2 is a dihedral composition of n = 5, but it is not symmetric, so it corresponds to two (inequivalent) cyclic compositions: 1_1 + 2_1 + 2_2 and 2_2 + 2_1 + 1_1.
		

Crossrefs

Formula

a(n) = (A307415(n) + A308723(n))/2 for n >= 1.
a(n) = (n/10) * (11*F(n) + 7*F(n-1)) + (-1)^n * (n/10) * (-4*F(n) + 7*F(n-1)) - (1/5) * (5*F(n+1) + 3*F(n)) - (-1)^n * (1/5) * (3*F(n) - 5*F(n-1)) + (1/2) * Sum_{s|n} phi(n/s) * F(2*s) for n >= 1, where F(n) = A000045(n) (Fibonacci numbers).
G.f.: (1/2) * (x^2 - x + 1) * x * (x^2 + 3*x + 1) * (x + 1)^2/((x^2 + x - 1)^2 * (x^2 - x - 1)^2) + (1/2) * Sum_{s >= 1} phi(s) * x^s/(1 - 3*x^s + x^(2*s)).
Showing 1-5 of 5 results.