Hello,
Here is a rather complex sequence question Suppose I have the following partial LET function:
The numbers in b indicate the count of numbers in each piece of the final sequence. The first piece starts with 1, and each piece after the first number is incremented by multiples of c starting at 1c for the second number of b, then 2c for the third number of b, and so on.
For the example above, the sequence starts with 1 and goes up for the indicated count in b, in this case 2, so the first piece of the sequence will be {1,2,...};
then, I want a "single" increment of c, i.e. 12, so the next element of the sequence would be 13, and since the second number of b is 1, this piece will have just one number, {...,13,...};
then, for the third number in b, I want a "double" increment of c, i.e. 24, so the third piece of the sequence will start at 25 and continue two more numbers up to 27, {...25,26,27,...};
then, for the fourth number in b, I want a "triple" increment of c, i.e. 36, and four numbers, {...,37,38,39,40,...};
and finally, for the fifth number in b, I want "quadruple" increment of c, i.e. 48, and two numbers, {...49,50}
So the final output should be a spill of {1,2,13,25,26,27,37,38,39,40,49,50}. Thus,
And here is another example:
And for this I want a final output spill of {1,9,10,11,12,25,26}; so 0 in the input indicates that no number is needed for that part of the sequence.
And another example:
And here the final output spill would be {6,7,8,11,16,17,18,19}.
I want to make a LAMBDA out of this , so I want it to work with any/variable counts of numbers in b.
I would appreciate any input
Thanks much!
Here is a rather complex sequence question Suppose I have the following partial LET function:
Excel Formula:
=LET(
b, {2,1,3,4,2},
c, 12,
operation
)
The numbers in b indicate the count of numbers in each piece of the final sequence. The first piece starts with 1, and each piece after the first number is incremented by multiples of c starting at 1c for the second number of b, then 2c for the third number of b, and so on.
For the example above, the sequence starts with 1 and goes up for the indicated count in b, in this case 2, so the first piece of the sequence will be {1,2,...};
then, I want a "single" increment of c, i.e. 12, so the next element of the sequence would be 13, and since the second number of b is 1, this piece will have just one number, {...,13,...};
then, for the third number in b, I want a "double" increment of c, i.e. 24, so the third piece of the sequence will start at 25 and continue two more numbers up to 27, {...25,26,27,...};
then, for the fourth number in b, I want a "triple" increment of c, i.e. 36, and four numbers, {...,37,38,39,40,...};
and finally, for the fifth number in b, I want "quadruple" increment of c, i.e. 48, and two numbers, {...49,50}
So the final output should be a spill of {1,2,13,25,26,27,37,38,39,40,49,50}. Thus,
And here is another example:
Excel Formula:
=LET(
b, {1,4,0,2},
c, 8,
operation
)
And for this I want a final output spill of {1,9,10,11,12,25,26}; so 0 in the input indicates that no number is needed for that part of the sequence.
And another example:
Excel Formula:
=LET(
b, {0,3,1,4,0,0},
c, 5,
operation
)
And here the final output spill would be {6,7,8,11,16,17,18,19}.
I want to make a LAMBDA out of this , so I want it to work with any/variable counts of numbers in b.
I would appreciate any input
Thanks much!