This a mindset thing. In a Domino environment sequential numbers are not really necessary for as many purposes as in an RDBMS.
Assuming that you really need a sequential number, though, it cannot be generated as easily as you might hope.
For this to work, your database cannot be replicated across multiple servers.
1) Create a view sorted in descending order by sequence number.
2) When a new document is created, grab the value in the first column in that view, insert the number into your new document.
3) Save the new document immediately.
This is NOT foolproof. In order to make it foolproof, you need to add a control document, and don't allow anyone to create a new document until they have a lock on the control document, then release control when the number is saved, but it doesn't sound like you are ready for all that.
You can make all these systems work across replicas if you include the server name as a part of a sort of compound primary key.
BTW to get the first value of the first column, do an
@Subset(@DbColumn......; 1)
Kevin