If we have a long carbon chain like octane for example, do we determine if a carbon is unique by just looking at the immediate surrounding atoms of each carbon (in this case 3 unique carbons), or do we need to take into account the symmetry of the whole molecule (many more unique carbons)? Edit: This is for NMR purposes
In general, the problem is a mathematical one. What you are asking for is the 'equivalence classes' of the atoms under the symmetry group. As pointed out in the comments, this may or may not be chemically important.
One simple way to divide the atoms into equivalence classes is to use Morgan numbers. The algorithm is particularly simple:
- Label the atoms with their degree (so terminal carbons are "1")
- Update each atom's label by adding the labels of the neighbouring atoms
- Repeat until the number of different labels is constant
So, for a linear hydrocarbon, the labels start out as [1, 2, 2, ..., 2, 1] and update to [3, 5, 6, 6, ..., 6, 5, 3]. After a couple more rounds, you get a pattern of labels like [a, b, c, d, d, c, b, a].
This works reasonably well, although there are more complex algorithms for determining non-equivalent atoms. As you have worked out, the atoms beyond the immediate neighbourhood are necessary.
If you don't look just at the closest neighbors, but see what the whole groups at each atom are, you see that in the case of octane, there are 2 carbons with one heptyl, 2 carbons with one methyl and one hexyl, 2 carbons one ethyl and one pentyl, and 2 carbons with one propyl and one butyl; i.e. 4 different carbon atoms (each one twice).