%I
%S 0,1,2,4,6,9,12,14,15,19,24,27,28,33,40,42,43,47,49,52,53,59,70,73,74,
%T 79,81,85,86,93,108,110,111,115,117,120,121,127,131,136,137,141,142,
%U 150,172,175,176,181,183,187,188,195,199,202,203,209,211,216,217,226,256
%N Toothpick sequence related to integer partitions (see Comments lines for definition).
%C This infinite toothpick structure is a minimalist diagram of regions of the set of partitions of all positive integers. For the definition of "region" see A206437. The sequence shows the growth of the diagram as a cellular automaton in which the "input" is A141285 and the "outputâ€ť is A194446.
%C To define the sequence we use the following rules:
%C We start in the first quadrant of the square grid with no toothpicks.
%C If n is odd we place A141285((n+1)/2) toothpicks of length 1 connected by their endpoints in horizontal direction starting from the grid point (0, (n+1)/2).
%C If n is even we place toothpicks of length 1 connected by their endpoints in vertical direction starting from the exposed toothpick endpoint downward up to touch the structure or up to touch the xaxis. In this case the number of toothpicks added in vertical direction is equal to A194446(n/2).
%C The sequence gives the number of toothpicks after n stages. A220517 (the first differences) gives the number of toothpicks added at the nth stage.
%C Also the toothpick structure (HV/HHVV/HHHVVV/HHV/HHHHVVVVV...) can be transformed in a Dyck path (UDUUDDUUUDDDUUDUUUUDDDDD...) in which the nth oddindexed segment has A141285(n) upsteps and the nth evenindexed segment has A194446(n) downsteps, so the sequence can be represented by the vertices (or the number of steps from the origin) of the Dyck path. Note that the height of the nth largest peak between two valleys at height 0 is also the partition number A000041(n). See Example section. See also A211978, A220517, A225610.
%H Omar E. Pol, <a href="http://www.polprimos.com/imagenespub/polpa408.jpg">Visualization of regions in a diagram for A006128</a>
%H N. J. A. Sloane, <a href="/wiki/Catalog_of_Toothpick_and_CA_Sequences_in_OEIS">Catalog of Toothpick and Cellular Automata Sequences in the OEIS</a>
%H <a href="/index/To#toothpick">Index entries for sequences related to toothpick sequences</a>
%F a(A139582(n)) = a(2*A000041(n)) = 2*A006128(n) = A211978(n), n >= 1.
%e For n = 30 the structure has 108 toothpicks, so a(30) = 108.
%e . Diagram of regions
%e Partitions of 7 and partitions of 7
%e . _ _ _ _ _ _ _
%e 7 15 _ _ _ _ 
%e 4 + 3 _ _ _ __ 
%e 5 + 2 _ _ _  
%e 3 + 2 + 2 _ _ __ __ 
%e 6 + 1 11 _ _ _  
%e 3 + 3 + 1 _ _ __  
%e 4 + 2 + 1 _ _   
%e 2 + 2 + 2 + 1 _ __ __  
%e 5 + 1 + 1 7 _ _ _   
%e 3 + 2 + 1 + 1 _ _ __   
%e 4 + 1 + 1 + 1 5 _ _    
%e 2 + 2 + 1 + 1 + 1 _ __    
%e 3 + 1 + 1 + 1 + 1 3 _ _     
%e 2 + 1 + 1 + 1 + 1 + 1 2 _      
%e 1 + 1 + 1 + 1 + 1 + 1 + 1 1       
%e .
%e . 1 2 3 4 5 6 7
%e .
%e Illustration of initial terms:
%e .
%e . _ _ _ _ _ _
%e . _ _ _ _ _ _ _ _ 
%e . _ _ _ _  _  _  
%e .         
%e .
%e . 1 2 4 6 9 12
%e .
%e .
%e . _ _ _ _ _ _ _ _
%e . _ _ _ _ _ _ _ _ 
%e . _ _ _ _ __ _ __ _ __ 
%e . _ _  _ _  _ _  _ _  
%e . _   _   _   _   
%e .             
%e .
%e . 14 15 19 24
%e .
%e .
%e . _ _ _ _ _ _ _ _ _ _
%e . _ _ _ _ _ _ _ _ _ _ _ _ 
%e . _ _ _ _ _ _ __ _ _ __ _ _ __ 
%e . _ _  _ _  _ _  _ _  
%e . _ __  _ __  _ __  _ __  
%e . _ _   _ _   _ _   _ _   
%e . _    _    _    _    
%e .                 
%e .
%e . 27 28 33 40
%e .
%e Illustration of initial terms as vertices (or the number of steps from the origin) of a Dyck path:
%e .
%e 7 33
%e . /\
%e 5 19 / \
%e . /\ / \
%e 3 9 / \ 27 / \
%e 2 4 /\ 14 / \ /\/ \
%e 1 1 /\ / \ /\/ \ / 28 \
%e . /\/ \/ \/ 15 \/ \
%e . 0 2 6 12 24 40
%e .
%Y Cf. A000041, A006128, A135010, A138137, A139250, A139582, A141285, A186114, A186412, A187219, A194446, A194447, A206437, A207779, A211978, A220517, A225610.
%K nonn
%O 0,3
%A _Omar E. Pol_, Jul 28 2013
