Closed crowlogic closed 7 months ago
A060632 a(n) = 2^wt(floor(n/2)) (i.e., 2^[A000120](https://oeis.org/A000120)(floor(n/2)), or [A001316](https://oeis.org/A001316)(floor(n/2))). 17
1, 1, 2, 2, 2, 2, 4, 4, 2, 2, 4, 4, 4, 4, 8, 8, 2, 2, 4, 4, 4, 4, 8, 8, 4, 4, 8, 8, 8, 8, 16, 16, 2, 2, 4, 4, 4, 4, 8, 8, 4, 4, 8, 8, 8, 8, 16, 16, 4, 4, 8, 8, 8, 8, 16, 16, 8, 8, 16, 16, 16, 16, 32, 32, 2, 2, 4, 4, 4, 4, 8, 8, 4, 4, 8, 8, 8, 8, 16, 16, 4, 4, 8, 8, 8, 8, 16, 16, 8, 8, 16, 16, 16, 16, 32 ([list](https://oeis.org/A060632/list); [graph](https://oeis.org/A060632/graph); [refs](https://oeis.org/search?q=A060632+-id:A060632); [listen](https://oeis.org/A060632/listen); [history](https://oeis.org/history?seq=A060632); [text](https://oeis.org/search?q=id:A060632&fmt=text); [internal format](https://oeis.org/A060632/internal))
OFFSET
0,3
COMMENTS
Number of conjugacy classes in the symmetric group S_n that have odd number of elements.
Also sequence [A001316](https://oeis.org/A001316) doubled.
Number of even numbers whose binary expansion is a child of the binary expansion of n. - [Nadia Heninger](https://oeis.org/wiki/User:Nadia_Heninger) and [N. J. A. Sloane](https://oeis.org/wiki/User:N._J._A._Sloane), Jun 06 2008
First differences of [A151566](https://oeis.org/A151566). Sequence gives number of toothpicks added at the n-th generation of the leftist toothpick sequence [A151566](https://oeis.org/A151566). - [N. J. A. Sloane](https://oeis.org/wiki/User:N._J._A._Sloane), Oct 20 2010
The Fi1 and Fi1 triangle sums, see [A180662](https://oeis.org/A180662) for their definitions, of Sierpiński's triangle [A047999](https://oeis.org/A047999) equal this sequence. - [Johannes W. Meijer](https://oeis.org/wiki/User:Johannes_W._Meijer), Jun 05 2011
Also number of odd entries in n-th row of triangle of Stirling numbers of the first kind. - [Istvan Mezo](https://oeis.org/wiki/User:Istvan_Mezo), Jul 21 2017
REFERENCES
I. G. MacDonald: Symmetric functions and Hall polynomials Oxford: Clarendon Press, 1979. Page 21.
LINKS
Indranil Ghosh, [Table of n, a(n) for n = 0..65536](https://oeis.org/A060632/b060632.txt) (terms 0..1000 from Harry J. Smith)
David Applegate, Omar E. Pol and N. J. A. Sloane, [The Toothpick Sequence and Other Sequences from Cellular Automata](https://oeis.org/A000695/a000695_1.pdf), Congressus Numerantium, Vol. 206 (2010), 157-191. [There is a typo in Theorem 6: (13) should read u(n) = 4.3^(wt(n-1)-1) for n >= 2.]
Christina Talar Bekaroğlu, [Analyzing Dynamics of Larger than Life: Impacts of Rule Parameters on the Evolution of a Bug's Geometry](https://scholarworks.calstate.edu/concern/theses/bk128j63v), Master's thesis, Calif. State Univ. Northridge (2023). See p. 92.
N. J. A. Sloane, [Catalog of Toothpick and Cellular Automata Sequences in the OEIS](https://oeis.org/wiki/Catalog_of_Toothpick_and_CA_Sequences_in_OEIS)
[Index entries for sequences related to toothpick sequences](https://oeis.org/index/To#toothpick)
FORMULA
a(n) = sum{k=0..floor(n/2), C(n, 2k) mod 2} - [Paul Barry](https://oeis.org/wiki/User:Paul_Barry), Jan 03 2005, Edited by [Harry J. Smith](https://oeis.org/wiki/User:Harry_J._Smith), Sep 15 2009
a(n) = gcd([A056040](https://oeis.org/A056040)(n), 2^n). - [Peter Luschny](https://oeis.org/wiki/User:Peter_Luschny), Jun 30 2011
G.f.: (1 + x) * Product_{k>=0} (1 + 2*x^(2^(k+1))). - [Ilya Gutkovskiy](https://oeis.org/wiki/User:Ilya_Gutkovskiy), Jul 19 2019
EXAMPLE
a(3) = 2 because in S_3 there are two conjugacy classes with odd number of elements, the trivial conjugacy class and the conjugacy class of transpositions consisting of 3 elements: (12),(13),(23).
From [Omar E. Pol](https://oeis.org/wiki/User:Omar_E._Pol), Oct 12 2011 (Start):
Written as a triangle:
1,
1,
2,2,
2,2,4,4,
2,2,4,4,4,4,8,8,
2,2,4,4,4,4,8,8,4,4,8,8,8,8,16,16,
2,2,4,4,4,4,8,8,4,4,8,8,8,8,16,16,4,4,8,8,8,8,16,16,8,...
(End)
MAPLE
[A060632](https://oeis.org/A060632) := proc(n) local k; add(binomial(n, 2*k) mod 2, k=0..floor(n/2)); end: seq([A060632](https://oeis.org/A060632)(n), n=0..94); # edited by [Johannes W. Meijer](https://oeis.org/wiki/User:Johannes_W._Meijer), May 28 2011
[A060632](https://oeis.org/A060632) := n -> 2^add(i, i = convert(iquo(n, 2), base, 2)); # [Peter Luschny](https://oeis.org/wiki/User:Peter_Luschny), Jun 30 2011
[A060632](https://oeis.org/A060632) := n -> igcd(2^n, n! / iquo(n, 2)!^2); # [Peter Luschny](https://oeis.org/wiki/User:Peter_Luschny), Jun 30 2011
MATHEMATICA
a[n_] := 2^DigitCount[Floor[n/2], 2, 1]; Table[a[n], {n, 0, 94}] (* [Jean-François Alcover](https://oeis.org/wiki/User:Jean-Fran%C3%A7ois_Alcover), Feb 25 2014 *)
PROG
(PARI) for (n=0, 1000, write("b060632.txt", n, " ", sum(k=0, floor(n/2), binomial(n, 2*k) % 2)) ) \\ [Harry J. Smith](https://oeis.org/wiki/User:Harry_J._Smith), Sep 14 2009
(PARI) a(n)=2^hammingweight(n\2) \\ [Charles R Greathouse IV](https://oeis.org/wiki/User:Charles_R_Greathouse_IV), Feb 06 2017
(Magma) a000120:=func< n | &+Intseq(n, 2) >; [ 2^a000120(Floor(n/2)): n in [0..100] ]; // [Klaus Brockhaus](https://oeis.org/wiki/User:Klaus_Brockhaus), Oct 15 2010
(Python)
def [A060632](https://oeis.org/A060632)(n):
return 2**bin(n/2)[2:].count("1") # [Indranil Ghosh](https://oeis.org/wiki/User:Indranil_Ghosh), Feb 06 2017
CROSSREFS
Cf. [A000120](https://oeis.org/A000120), [A001316](https://oeis.org/A001316), [A139251](https://oeis.org/A139251), [A151566](https://oeis.org/A151566), [A160407](https://oeis.org/A160407).
Sequence in context: [A122386](https://oeis.org/A122386) [A051464](https://oeis.org/A051464) [A151565](https://oeis.org/A151565) * [A160407](https://oeis.org/A160407) [A007457](https://oeis.org/A007457) [A119802](https://oeis.org/A119802)
Adjacent sequences: [A060629](https://oeis.org/A060629) [A060630](https://oeis.org/A060630) [A060631](https://oeis.org/A060631) * [A060633](https://oeis.org/A060633) [A060634](https://oeis.org/A060634) [A060635](https://oeis.org/A060635)
KEYWORD
nonn
AUTHOR
Avi Peretz (njk(AT)netvision.net.il), Apr 15 2001
EXTENSIONS
More terms from [James A. Sellers](https://oeis.org/wiki/User:James_A._Sellers), Apr 16 2001
Edited by [N. J. A. Sloane](https://oeis.org/wiki/User:N._J._A._Sloane), Jun 06 2008; Oct 11 2010
a(0) = 1 added by [N. J. A. Sloane](https://oeis.org/wiki/User:N._J._A._Sloane), Sep 14 2009
Formula corrected by [Harry J. Smith](https://oeis.org/wiki/User:Harry_J._Smith), Sep 15 2009
STATUS
approved
its just a static function in the IntegerSequence class, the expression compiler makes it nice and concise
its just a static function in the IntegerSequence class, the expression compiler makes it nice and concise
Implement A060632 Sequence Class
Create
SymmetricGroupOddConjugacyClassCounts
class extendingIntegerSequence
. It calculates the number of odd conjugacy classes in symmetric groups based on OEIS A060632. Details and sequence values are available on the OEIS entry.[1,1,2,2,2,2,4,4,2,2,4,4,4,4,8,8,2,2,4,4,4,4,8,8, 4,4,8,8,8,8,16,16,2,2,4,4,4,4,8,8,4,4,8,8,8,8,16, 16,4,4,8,8,8,8,16,16,8,8,16,16,16,16,32,32,2,2,4, 4,4,4,8,8,4,4,8,8,8,8,16,16,4,4,8,8,8,8,16,16,8,8, 16,16,16,16,32]