%I #5 Sep 13 2016 14:39:24
%S 4,6,6,2,6,4,6,4,2,6,4,4,6,4,4,2,6,4,4,4,6,4,4,4,2,6,4,4,4,4,6,4,4,4,
%T 4,2,6,4,4,4,4,4,6,4,4,4,4,4,2,6,4,4,4,4,4,4,6,4,4,4,4,4,4,2,6,4,4,4,
%U 4,4,4,4,6,4,4,4,4,4,4,4,2,6,4,4,4,4,4,4,4,4,6,4,4,4,4,4,4,4,4,2,6,4,4,4,4
%N A folded-back triangular sequence based on symmetry of CnH2*n+2 straight chain alkanes and the number of hydrogen atoms of a given symmetry type: Besides methane at 4 there are only three symmetry types: two CH3's->6: a single CH2->2, two CH2's->4.
%H Wikipedia, <a href="http://en.wikipedia.org/wiki/Alkane">Alkane</a>
%F a(n,m) = If[n == m == 1, 4, If[n == 1 && m >1, 6, If[Mod[m, 2] == 1 && n == Floor[m/2] + 1, 2, 4]]]
%e {4},->Ch4
%e {6}, ->CH3CH3
%e {6, 2}, ->CH3CH2CH3
%e {6, 4}, ->CH3CH2CH2CH3
%e {6, 4, 2}, ->CH3CH2CH2CH2CH3
%e {6, 4, 4}, ->CH3CH2CH2CH2CH2CH3
%e {6, 4, 4, 2}, ->CH3CH2CH2CH2CH2CH2CH3
%e {6, 4, 4, 4}, ->CH3CH2CH2CH2CH2CH2CH2CH3
%t f[n_, m_] = If[n == m ==1, 4, If[n == 1 && m > 1, 6, If[Mod[m, 2] == 1 && n == Floor[m/2] + 1, 2, 4]]]; Table[Table[f[n, m], {n, 1, If[m == 1, 1,If[Mod[m, 2] == 0, Floor[m/2], Floor[m/2] + 1]]}], {m, 1, 20}]; Flatten[%]
%K nonn,tabf
%O 1,1
%A _Roger L. Bagula_, Jul 13 2007
|