There is no formula to calculate the number of structural isomers of an alkane. This is mainly due to the fact that with a certain number of carbons, they can branch out (although most are unstable and do not actually exist).
For example, the formula C4H10 represents both butane and 2-methylpropane (both are stable in similar SCTPs) :
The first ten are:
Number of carbons → Number of structural isomers
0→11→12→13→14→25→36→57→98→189→3510→75
Here is a method to calculate the total no. of stereo isomers of an organic compound,in the following categories:
(A)Compound has n-chiral centres with no symmetry in the molecule
Then, No. of Optical Isomers (X)=2n
and, No. of Meso-structures (Y)=0
Hence total no. of stereo isomers= X+Y=2n
(B)Symmetry in the molecule and even no. of chiral centres
Then, No. of Optical Isomers (X)=2(n−1)
and, No. of Meso-structures (Y)=2(n2−1)
Hence total no. of stereo isomers= X+Y=[2(n−1)]+[2(n2−1)]
(C)Symmetry in the molecule and odd no. of chiral centres
Then, No. of Optical Isomers (X)=[2(n−1)]−[2([n−1]2)]
and, No. of Meso-structures (Y)=2([n−1]2)
Hence total no. of stereo isomers=X+Y=2(n−1)
However you must be careful because in some cases we get
no. of optical isomers=no. of geometric isomers= no. of stereo isomers where the geometric isomers are themselves optically active.