%I #10 Oct 29 2018 11:51:18
%S 1,1,2,6,24,118,686,4598,34872,295044,2753958,28103804,311216626,
%T 3716341042,47597786154,650812077852,9461423560788,145724617925326,
%U 2370293673319292,40600119927220706,730458115445479734
%N Number of physical trees of alkane structures with n carbon vertices.
%C Similar to A000602 (alkane trees with n carbon atoms) but keeping track of the history of attaching carbon atoms (methyls) to the backbone, as if these had been labeled.
%H J. V. Knop, W. R. Muller, K. Szymanski et al., <a href="http://dx.doi.org/10.1002/jcc.540080435">Computer enumeration and generation of physical trees</a>, J. Comput. Chem. vol. 8 no. 4 (1987) pp 549-554.
%F a(n) = A248837(n-2). - _Georg Fischer_, Oct 23 2018
%e Starting with a(1)=1, one C1 methane, we get a(2)=1, the C1-C2 backbone.
%e The third can be attached to either C1 ending up with C3-C1-C2, or to C2 ending up with C1-C2-C3, yielding a(3)=2 different propanes.
%e C4 may be attached to any of C1 to C3 in these two propanes, yielding a(4)=6 different butanes, four of which are linear and two of which are stars.
%p A135106 := proc(n) local numb, stack,istack,N,i ; numb := array(1..n) ; for i from 1 to n do numb[i] := 0 ; od: stack := array(1..7,1..100) ; stack[1,1]:=2 ; stack[2,1]:=0 ; stack[3,1]:=0 ; stack[4,1]:=0 ; stack[5,1]:=1 ; stack[6,1]:=0 ; stack[7,1]:=1 ; istack := 1 ; while istack <> 0 do for i from 1 to 7 do stack[i,istack+1] := stack[i,istack] ; od: if stack[6,istack] = 3 then istack := istack-1 ; else stack[6,istack] := stack[6,istack]+1 ; stack[1,istack+1] := stack[1,istack]+1 ; N := stack[6,istack] ; if stack[N,istack] <> 0 then stack[N,istack+1] := stack[N,istack+1]-1 ; stack[N+1,istack+1] := stack[N+1,istack+1]+1 ; stack[5,istack+1] := stack[N,istack]*stack[5,istack] ; stack[6,istack+1] := 0 ; stack[7,istack+1] := stack[7,istack]+1 ; numb[stack[7,istack+1]]:=numb[stack[7,istack+1]]+stack[5,istack+1] ; if stack[7,istack+1] <> n then istack := istack+1 ; fi ; fi ; fi ; od: numb[n] ; end: for n from 2 do print( A135106(n)) ; end: # _R. J. Mathar_, Feb 18 2008
%K nonn
%O 1,3
%A _R. J. Mathar_, Feb 12 2008
%E More terms from _R. J. Mathar_, Feb 18 2008
%E a(20)-a(21) from _Alois P. Heinz_, May 27 2013