The accession assignment process is managed by prior agreement within the collaboration on which group will " own" which accession prefix. This list of accession number prefixes should be used as a guide. But you can use A GENE NAME, GENE PRODUCT NAME, GENE SYMBOL, OR NCBI SEQUENCE ACCESSION NUMBER. Search the PubMed database of biomedical literature with the gene, symbol or sequence accession number. Search the Gene database with the gene name, symbol or sequence accession number. Click on the desired gene. For more details consult https://www.ncbi.nlm.nih.gov
A sequence can only have a valid accession number if it is submitted to any database, specifically to NCBI/EBI/DDBJ. Primer ID doesn't have anything to do with the gene accession number.