We have a formula to calculate PCI=3*(PCI group)+cell identity in group
When we switch on UE it will scan and tune to its radio frequency depending on which band it is supporting Now suppose ue is tuned to a particular frequency channel, it will try to find PSS and SSS.
From PSS UE will get cell id in group ranges from 0 to 2
Fron SSS UE will get physical cell id group ranges from 0 to 167