Number pattern continuation is a bit broken

Post Reply
vic
Posts: 8
Joined: Sat Jul 19, 2025 8:08 am

Number pattern continuation is a bit broken

Post by vic »

I'm refering to inserting a sequence of numbers, in a row or column, then selecting them all and dragging by the corner.

1,1 => 1,1,1,1... OK
1,empty,1,empty => 2,empty,2,empty,3,empty,3,empty .... NOT OK, inconsistent
expected=> 1,empty,1,empty,1,empty,1,empty,....


1,1,2,2 =>2,3,3,3,3,4,4,4,4,4... NOT OK, because I did not indicate the count of each kind of number to increase
expected=> 3,3,4,4,5,5....
1,empty,1,empty,2,empty,2,empty => 2,empty,2,empty,3,empty,3,empty,3,empty,3,empty,4,empty,4,empty,4,empty,4,empty : NOT OK
expected=>3,empty,3,empty,4,empty,4,empty...


Finally, case for next is not so strong:
1=>2,3,4,
ab=>ab,ab,ab

For consistency, I would prefer this:
1=>1,1,1, (because it's not a reference to expect to increase automatically by 1)
ab=>ab,ab,ab
vic
Posts: 8
Joined: Sat Jul 19, 2025 8:08 am

Re: Number pattern continuation is a bit broken

Post by vic »

After more thinking, it's better to separate the cases with only numbers vs with numbers and empty cells.

Thus I'll focus first on number-only patterns.

Here's a pattern rule that I think it's one of the simplest but also more powerful than what's currently in use:

Start with the linear (arithmetic) pattern, indicated by 2 numbers that the users enters:
a, b
from which PM infers d(delta)=b-a, to add to current number to get next, every time.

Generalize it to 2 groups of equal count of numbers each.
For instance, user enters 4 numbers, meant to be 2 groups of 2 each:
a1 a2 b1 b2
where now there are 2 deltas/changes, for each pairs of numbers in corresponding positions:
d1=b1-a1; d2=b2-a2
meant to be applied to numbers in current group to get the numbers of the next group.

Some example patterns that are easily generated by such a rule:
p1: 1,3 => 5,7,9.. (groups of 1 number each, d=2)
p2: 1,1,1,3,3,3 => 5,5,5,7,7,7.. (groups of 3 numbers, d1=2, d2=2, d3=2)
p3: 1,3,5,1,3,5 => 1,3,5,1,3,5.. (groups of 3 numbers, d1=d2=d3=0)
p4: 1,2,3,2,4,6 => 3,6,9,4,8,12.. (groups of 3 numbers, d1=1,d2=2,d3=3)

You can see that this rule covers all patterns currently possible in PM and much more.

In particular, p2 is not currently possible in PM by pattern continuation.
I have encountered it in practice wanting to have: 2000,2000,2000,2000,2001,2001,2001,2001...
I have noticed another user wanting a similar pattern with letters:
A,A,A,A,B,B,B,B,C,C,C,C...
which will be possible too, with my rule above, once PM implements a way to increment letters, indefinitely (after Z can come AA, as in spreadsheets)

What if the user does not enter 2 groups of exactly same count?
If 3 or more equal groups - then PM can check the above still holds.
If unequal groups => PM can fall back to what it is doing now.

The above rule can ge generalized to cases when empty cells are involved - but on this later, if you'll be interested.

What do you think? Any chances to be implemented?
Post Reply

Return to “PlanMaker NX and 2024 for Windows”