(*This Program is designed to compute the "Set of Configurations" and the "Set of Equivalent Resistances" of n Equal Resistors connected in Series and/or Parallel.  The order of the Set of Equivalent Resistances is the Sequence A048211: 1, 2, 4, 9, 22, 53, 131, 337, 869, 2213, 5691, 14517, 37017, 93731, 237465, 601093, 1519815, 3842575, 9720769, 24599577, 62283535, 157807915, .... The "Order of the Set of Configurations" is the Sequence A00084: 1, 2, 4, 10, 24, 66, 180, 522, 1532, 4624, 14136, 43930, 137908, 437502, 1399068, 4507352, 14611576, ....  Start the Program by entering the value of n. Example: n = 4, NumberResistors = 4, NumberConfigurations = 10 and  NumberEquivalentResistances = 9.  Author: Sameen Ahmed KHAN, rohelakhan@yahoo.com, http://SameenAhmedKhan.webs.com/ and http://sites.google.com/site/rohelakhan/ E-Print archive: http://arxiv.org/abs/1004.3346/ (21 April 2010) Date: Wednesday the 21 April 2010*)

NumberResistors = 4;
ClearAll[CirclePlus, CircleTimes];
SetAttributes[{CirclePlus, CircleTimes}, {Flat,Orderless}];
SeriesCircuit[a_, b_]:= a⊕b;
ParallelCircuit[a_, b_]:= a⊗b;
F[a_,b_]:= Flatten[Outer[SeriesCircuit, a, b]⋃Outer[ParallelCircuit, a, b], 2];
S={{R}, {R⊕R, R⊗R}};
Do[SX = F[S[[1]], S[[i-1]]];
    Do[SX = Flatten[SX⋃F[S[[k]], S[[i-k]]], 2]; , {k, 2, i/2}];
    S = S⋃{SX}; , {i, 3, NumberResistors}];
S[[NumberResistors]] (*This line displays the Full Set of Configurations*)
Print[StringForm["NumberResistors = ``, NumberConfigurations = ``", NumberResistors, Dimensions[S[[NumberResistors]]]]]
SetAttributes[{CirclePlus, CircleTimes},{NumericFunction, OneIdentity}];
a_⊕b_:= a + b;
a_⊗b_:= a*b/(a+b);
CirclePlus[x_]:= x;
CircleTimes[x_]:= x;
(*Print[S[[NumberResistors]]/.R->1]*) (*This line displays the Set of Equivalent Resistances corresponding to the Set of Configurations*)
(*Print[Union[S[[NumberResistors]]/.R->1]]*) (*This line displays the Full Set of Equivalent Resistances*)
Print[StringForm["NumberResistors = ``, NumberConfigurations = ``,  NumberEquivalentResistances = ``, CPU time in seconds = ``", NumberResistors, Dimensions[S[[NumberResistors]]], Dimensions[Union[S[[NumberResistors]]]], TimeUsed[%]]]