1 Chronicles 24
Levi’s descendants assigned responsibilities by casting lots
This is how Aaron's descendants were divided. Aaron's sons were Nadab, Abihu, Eleazar, and Ithamar. Nadab and Abihu had no children and died before their father, so Eleazar and Ithamar became the priests. With the help of Zadok (Eleazar's descendant) and Ahimelech (Ithamar's descendant), David grouped them all by their appointed responsibilities. Since more of the leaders came from Eleazar than Ithamar, they organized them under sixteen patriarchs from Eleazar's descendants, and eight from Ithamar's. Eleazar's and Ithamar's descendants both had sacred officers and officers of God, so they grouped them by casting lots. Shemaiah the scribe (Nethanel's son, a Levite) recorded them in front of the king, the princes, Zadok the priest, Ahimelech (Abiathar's son), and Levite patriarchs from both Eleazar's and Ithamar's side.
Here's the order that the lots fell on them:
Jehoiarib
Jedaiah
Harim
Seorim
Malchijah
Mijamin
Hakkoz
Abijah
Jeshua
Shecaniah
Eliashib
Jakim
Huppah
Jeshebeab
Bilgah
Immer
Hezir
Happizzez
Pethahiah
Jehezkel
Jachin
Gamul
Delaiah
Maaziah
These were appointed to enter the Existing One's house according to the procedure that Israel's God the Existing One had ordered them through their ancestor Aaron.
The rest of Levi's descendants:
These were Levi's descendants according to their patriarchs. Each patriarch with his younger brother also cast lots just like Aaron's descendants in front of King David, Zadok, Ahimelech, and the Levite priest patriarchs.