Display the reference number:
Just echo() or output it in the same way you would do for any other data of your DB. Reference numbers are not stigmatized in any way as undiplayable. Just avoid to make it editable or updatable !!!
Set a start value:
Define your DB field as "AUTOINCREMENT" (in MySql), define a sequence (in ORACLE), or use the appropriate mechanism provided by your DBMS.
Then, define the start value :
in ORACLE, is done in the definition of the sequence (you can also define the increment, etc.)
in MySql: insert a dummy-row with id = start_id - 1; the next row inserted will automatically have the desired start-value !!