Variable Sequence

@john_9995 recently posted a solution which might meet your requirements: