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-2 of 2 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
Showing 1-2 of 2 results.