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.

A032189 Number of ways to partition n elements into pie slices each with an odd number of elements.

This page as a plain text file.
%I A032189 #44 Sep 23 2023 15:17:07
%S A032189 1,1,2,2,3,4,5,7,10,14,19,30,41,63,94,142,211,328,493,765,1170,1810,
%T A032189 2787,4340,6713,10461,16274,25414,39651,62074,97109,152287,238838,
%U A032189 375166,589527,927554,1459961,2300347,3626242,5721044,9030451,14264308,22542397,35646311,56393862,89264834,141358275
%N A032189 Number of ways to partition n elements into pie slices each with an odd number of elements.
%C A032189 a(n) is also the total number of cyclic compositions of n into odd parts assuming that two compositions are equivalent if one can be obtained from the other by a cyclic shift. For example, a(5)=3 because 5 has the following three cyclic compositions into odd parts: 5, 1+3+1, 1+1+1+1+1. - _Petros Hadjicostas_, Dec 27 2016
%H A032189 C. G. Bower, <a href="/transforms2.html">Transforms (2)</a>
%H A032189 P. Flajolet and M. Soria, <a href="http://algo.inria.fr/flajolet/Publications/publist.html">The Cycle Construction</a> In SIAM J. Discr. Math., vol. 4 (1), 1991, pp. 58-60.
%H A032189 Petros Hadjicostas, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL19/Hadjicostas/hadji2.html">Cyclic compositions of a positive integer with parts avoiding an arithmetic sequence</a>, Journal of Integer Sequences, 19 (2016), Article 16.8.2.
%H A032189 Silvana Ramaj, <a href="https://digitalcommons.georgiasouthern.edu/etd/2273">New Results on Cyclic Compositions and Multicompositions</a>, Master's Thesis, Georgia Southern Univ., 2021.
%H A032189 <a href="/index/Ne#necklaces">Index entries for sequences related to necklaces</a>
%F A032189 a(n) = A000358(n)-(1+(-1)^n)/2.
%F A032189 "CIK" (necklace, indistinct, unlabeled) transform of 1, 0, 1, 0...(odds)
%F A032189 G.f.: Sum_{k>=1} phi(k)/k * log( 1/(1-B(x^k)) ) where B(x) = x/(1-x^2). [_Joerg Arndt_, Aug 06 2012]
%F A032189 a(n) = (1/n)*Sum_{d divides n} phi(n/d)*A001350(d). - _Petros Hadjicostas_, Dec 27 2016
%t A032189 a1350[n_] := Sum[Binomial[k - 1, 2k - n] n/(n - k), {k, 0, n - 1}];
%t A032189 a[n_] := 1/n Sum[EulerPhi[n/d] a1350[d], {d, Divisors[n]}];
%t A032189 Array[a, 50] (* _Jean-François Alcover_, Jul 29 2018, after _Petros Hadjicostas_ *)
%o A032189 (PARI)
%o A032189 N=66;  x='x+O('x^N);
%o A032189 B(x)=x/(1-x^2);
%o A032189 A=sum(k=1,N,eulerphi(k)/k*log(1/(1-B(x^k))));
%o A032189 Vec(A)
%o A032189 /* _Joerg Arndt_, Aug 06 2012 */
%o A032189 (Python)
%o A032189 from sympy import totient, lucas, divisors
%o A032189 def A032189(n): return sum(totient(n//k)*(lucas(k)-((k&1^1)<<1)) for k in divisors(n,generator=True))//n # _Chai Wah Wu_, Sep 23 2023
%Y A032189 Cf. A000358, A001350, A008965.
%K A032189 nonn
%O A032189 1,3
%A A032189 _Christian G. Bower_