Sequence()
Syntax
The Sequence() function in Office 365 creates an array of sequential numbers. The syntax is pretty easy:
=SEQUENCE(rows,[columns],[start],[step])



Pretty simple.
Dates
The sequence() function is really useful with other functions. For example, let's say you want a list of dates in January 2024. Just enter:
=DATE(2024,1,SEQUENCE(31))

Or, if you want all the dates for 2024, enter:
=DATE(2024,1,SEQUENCE(365))
You will get 365 days.
You can get the first day of the month simply by moving the Sequence() function within the Date() function.
=DATE(2024,SEQUENCE(12),1))

The same can be done if you want the last day of the month. Just wrap the Date() function with the Eomonth() function:
=EOMONTH(DATE(2024,SEQUENCE(12),1),0)

Creating an index value
Let's say you have a list of data you will be sorting, but you want to keep the original list in order. The formula below will take your list (assuming you have less than 10,000 records) and assign an index value to them.
=SEQUENCE(COUNTA(A2:A10000))
Then, you can copy the column and paste as values. When you sort the table of values, include the index, and you will always know the order you initially used.