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.

A365857 Number of cyclic compositions of 2*n into odd parts.

Original entry on oeis.org

1, 2, 4, 7, 14, 30, 63, 142, 328, 765, 1810, 4340, 10461, 25414, 62074, 152287, 375166, 927554, 2300347, 5721044, 14264308, 35646311, 89264834, 223959710, 562878429, 1416953362, 3572233420, 9018211989, 22795835726, 57690911720, 146164582455, 370705552702, 941109975022, 2391391374017, 6081865318124
Offset: 1

Views

Author

Joshua P. Bowman, Sep 20 2023

Keywords

Comments

Even bisection of A032189.
Also the number of cyclic compositions into an even number of odd parts; because such a sum must be even, alternating terms are zero and have been removed.
Also the number of dual classes of cyclic n-color compositions of n. A cyclic composition is a sum of positive integers in which the order of the parts is considered up to cyclic permutation. In other words, it is the collection of components remaining in the cycle graph C_n on n vertices when one or more edges are removed, and rotations are considered equivalent. In an n-color composition, each part of size k is assigned one of k "colors" which may be represented graphically by marking one vertex in the part. (See A032198 for the number of cyclic n-color compositions.) The dual of a cyclic n-color composition is obtained by switching the roles of edges and vertices in C_n, then removing each edge that came from a previously marked vertex while marking each vertex that came from a previously removed edge. Each cyclic n-color composition of n either belongs to a dual pair or is self-dual. (See A365859 for the number of self-dual cyclic n-color compositions.)

Crossrefs

Programs

  • PARI
    N=99;  x='x+O('x^N); B(x)=x/(1-x^2);
    A=Vec(sum(k=1, N, eulerphi(k)/k*log(1/(1-B(x^k)))));
    vector(#A\2,n,A[2*n]) \\ Joerg Arndt, Sep 22 2023
    
  • Python
    from sympy import totient, lucas, divisors
    def A365857(n): return sum(totient((n<<1)//k)*(lucas(k)-((k&1^1)<<1)) for k in divisors(n<<1,generator=True))//n>>1 # Chai Wah Wu, Sep 23 2023

Formula

G.f.: (1/2)*(Sum_{k>=1} phi(k)/k * log((1-2*x^k+x^(2*k))/(1-3*x^k+x^(2*k))) + Sum_{m>=1} phi(2*m)/(2*m) * log((1+x^m-x^(2*m))/(1-x^m-x^(2*m)))).
a(n) = (1/(2*n)) * Sum_{k divides 2*n} phi(k)*A001350((2*n)/k).
a(n) = (A032198(n) + A365859(n))/2.

A365858 Number of cyclic compositions of 2*n-1 into odd parts.

Original entry on oeis.org

1, 2, 3, 5, 10, 19, 41, 94, 211, 493, 1170, 2787, 6713, 16274, 39651, 97109, 238838, 589527, 1459961, 3626242, 9030451, 22542397, 56393862, 141358275, 354975433, 892893262, 2249412291, 5674891017, 14335757586, 36259245523, 91815545801, 232745229290, 590586152235, 1500020153485, 3813274653414
Offset: 1

Views

Author

Joshua P. Bowman, Sep 20 2023

Keywords

Comments

Odd bisection of A032189.
Also the number of cyclic compositions into an odd number of odd parts; because such a sum must be odd, alternating terms are zero and have been removed.

Crossrefs

Programs

  • Mathematica
    Table[1/(2*n - 1) * Sum[EulerPhi[k]*LucasL[(2*n - 1)/k], {k, Divisors[2*n - 1]}], {n, 1, 40}] (* Vaclav Kotesovec, Sep 22 2023 *)
  • PARI
    N=99;  x='x+O('x^N); B(x)=x/(1-x^2);
    A=Vec(sum(k=1, N, eulerphi(k)/k*log(1/(1-B(x^k)))));
    vector(#A\2,n,A[2*n-1]) \\ Joerg Arndt, Sep 22 2023
    
  • Python
    from sympy import totient, lucas, divisors
    def A365858(n): return sum(totient(((n<<1)-1)//k)*(lucas(k)-((k&1^1)<<1)) for k in divisors((n<<1)-1,generator=True))//((n<<1)-1) # Chai Wah Wu, Sep 23 2023

Formula

G.f.: (1/2) * Sum_{k odd} (phi(k)/k)*log((1+x^k-x^(2k))/(1-x^k-x^(2*k))), where phi(n) = A000010(n).
a(n) = (1/(2*n-1)) * Sum_{k divides 2n-1} phi(k)*A000204((2*n-1)/k).
a(n) ~ ((1+sqrt(5))/2)^(2*n-1) / (2*n). - Vaclav Kotesovec, Sep 22 2023

A365859 Number of self-dual cyclic n-color compositions.

Original entry on oeis.org

1, 1, 2, 1, 3, 2, 5, 1, 10, 3, 19, 2, 41, 5, 94, 1, 211, 10, 493, 3, 1170, 19, 2787, 2, 6713, 41, 16274, 5, 39651, 94, 97109, 1, 238838, 211, 589527, 10, 1459961, 493, 3626242, 3, 9030451, 1170, 22542397, 19, 56393862, 2787, 141358275, 2, 354975433, 6713, 892893262, 41, 2249412291, 16274, 5674891017
Offset: 1

Views

Author

Joshua P. Bowman, Sep 20 2023

Keywords

Comments

A cyclic composition is a sum in which the order of the parts is considered up to cyclic permutation. In other words, it is the collection of components remaining in the cycle graph C_n on n vertices when one or more edges are removed, and rotations are considered equivalent. In an n-color composition, each part of size k is assigned one of k "colors" which may be represented graphically by marking one vertex in the part. The dual of a cyclic n-color composition is obtained by switching the roles of edges and vertices in C_n, then removing each edge that came from a previously marked vertex while marking each vertex that came from a previously removed edge. A cyclic n-color composition is self-dual if it is invariant under this process.
a(n) is also the number of cyclic compositions of A000265(n) into odd parts.
This sequence is self-similar; removing all odd-indexed terms results in the same sequence.

Examples

			Every power of 2 has only one self-dual cyclic n-color composition, which has all parts of size 1.
The self-dual cyclic n-color compositions of 5 are 1_1+1_1+1_1+1_1+1_1, 1_1+2_2+2_1, and 5_3, where the subscript indicates the color of the part, or which vertex is marked within the part.
		

Crossrefs

Programs

  • PARI
    my(N=66,x='x+O('x^N)); Vec( sum(k=1,N, eulerphi(2*k)/(2*k) * log((1+x^k-x^(2*k))/(1-x^k-x^(2*k))) ) )  \\ Joerg Arndt, Sep 21 2023
    
  • Python
    from sympy import totient, lucas, divisors
    def A365859(n):
        m = n>>(~n&n-1).bit_length()
        return sum(totient(k)*lucas(m//k) for k in divisors(m,generator=True))//m # Chai Wah Wu, Sep 23 2023

Formula

G.f.: Sum_{k>=1} phi(2*k)/(2*k) * log((1+x^k-x^(2*k))/(1-x^k-x^(2*k))).
a(n) = (1/(b(n)))*[Sum_{k divides A000265(n)} phi(k)*lucas(b(n)/k)], where b(n) = A000265(n) and lucas(n) = A000204(n).
a(n) = 2*A365857(n) - A032198(n).
Showing 1-3 of 3 results.