5G/NR  Pre Trial  Pseudo Random Sequence 

NOTE : This note is about a tempary 5G specification that was implemented and tried before 5G specification is finalized. I keep this note for study purpose.
Pseudo Random Sequence
The two most famous numerical sequence in both LTE and 5G Pretrial is Zadoff Chu sequence and Pseudo Random sequence. Sequence Generation algorithm for these two sequence is almost same in both LTE and 5G Pretrial, but these sequence are more widely used in 5G Pretrial specification. Followings are the list of applications of these sequences.
As in LTE, the Pseudo Random Sequence in 5G trial is a kind of Gold Sequence and it is based on a common form as shown below. This algorithm is exactly same as LTE pseudo random sequence. (So I recommed you to read through LTE Pseduo Random Sequence page as well since I put more descriptions in the page).
How do we utilize this single mathematical form to such a many different application ? First trick is to use different 'n' in c(n). The second, more important, is to use different initialization value. The initialization value gets different depending on applications. I put down all the initialization value for each and every application listed in the table shown above. You don't have to memorize nor try to understand these equation itself, just try to figure out what kind of parameters are involved in determining the initialization value for each application. Some of these parameters are from RRC message or DCI, these values shown here will help you understand those RRC / DCI parameters.
Following is an example of the sequence when n = 119 (120 data point) and the initialization value is 64.
Disclaimer : This code is just to push myself (probably readers) to look into the algorithm (formula) specified in the specification to the most detailed level. If you try to convert the specification into the programming code whatever language you choose, you will understand the equation / algorithm in much more detailed level than just reading the document. However, this code has not been verified with any real data.

