Offset default value

Jonathan Sondow jsondow at alumni.princeton.edu
Fri Dec 22 06:42:42 CET 2006


Let's take your example

2 3 4 5 6 7 ... b=1

and a new example (A010060)

0 1 1 0 1 0 ... b=1

Your example has b=1 because the 1st term is (greater than or) equal to 2.
The new example has b=1 because there is no term greater than or equal to 2.

Isn't that unnecessarily ambiguous? Would it not be clearer if the default
value were defined to be b=0 instead of b=1?

That would instantly and unambiguously tell the reader that no term is
greater than or equal to 2. The reader would not have to check the sequence
to decide which of the two possible reasons for having b=1 was the case.


On 12/21/06 11:34 PM N. J. A. Sloane wrote:

> J.S. said:
> 
> %O = Offset a, b :
> 
> *    a is subscript of first term
> *    b gives position of first entry greater than or equal to 2 in magnitude
> (or 1 if no such entry exists)
> 
> But why is 1 the default value of b? Wouldn't 0 or even -1 be better? After
> all, the value b = 1 can appear in the usual, non-default case.
> 
> Me:  no, this reveals that once again I have failed
> to convey the meaning of the second offset!
> 
> examples:
> 
> 1 2 3 4 5 6...   b=2
> 
> 2 3 4 5 6 7 ...  b=1
> 
> 10 20 30 ...     b=1
> 
> 0 0 0 -1 1 1 2 3 4 ... b=7
> 
> start with first term, which is term ONE. move right
> until
> you reach a term with absolute value > 1.
> it's position is b
> 
> by definition b >= 1, therefore, and b = 1 is the commonest value.
> 
> Neil
> 







More information about the SeqFan mailing list