Use of the term "consecutive" to describe a single item

There's an exercise on Hackerrank, a programming website, that asks me to find the number of consecutive 1s in a binary representation of a decimal number (e.g. 5 is 101 in binary). The author of the problem gave sample inputs and outputs along with his explanations:

Sample Case 1: The binary representation of 5 is 101, so the maximum number of consecutive 1's is 1.

Sample Case 2: The binary representation of 13 is 1101, so the maximum number of consecutive 1's is 2.

Why are there 1 consecutive 1s in the number 101? The term consecutive by its very definition implies sequential multiplicity. It makes sense to say that there are two consecutive 1s in the second example because there is a single "1" followed by yet another "1", but why does it make sense to say there are 1 consecutive 1s? I've never heard anyone use the term "consecutive" to describe a single item.


First note the context in which these examples are presented - namely in the context of programming.

It is true that colloquially we would not say that there is one consecutive instance of the digit 1. However, in the more formal setting of programming it is desirable to handle exceptions without dealing with special cases. This is because case handling is generally considered to be inelegant in programming.

Therefore, a programmer will most likely write a method (called, for example countConsecutive(String, String)) that simply counts the number of "consecutive" instances of some string in another string and then call this the number of consecutive instances.

For example, the programmer's method would most likely say that there are zero consecutive twos in the string "101".


Think of 'consecutive' here as 'in a row'. In 1101 you have three ones, but only two in a row.