OFFSET
1,3
COMMENTS
Definition 9.1.2. of the Crandall-Pomerance book is: "The balanced base-B representation of a nonnegative integer x is the shortest sequence of integer digits (x_i) such that each digit satisfies -floor(B/2) <= x_i <= floor((B-1)/2) and x = sum(i=0,D-1,x_i*B^i)." (I have replaced floor and sigma symbols with "floor" and "sum" for inclusion here.) The D digits x_0, x_1, x_2, ..., x_(D-1) are included in this order in this sequence and in the opposite order in A097150.
REFERENCES
R. Crandall and C. Pomerance, Prime Numbers: A Computational Perspective, Springer, NY, 2001; see p. 408.
EXAMPLE
As the only digits permissible are in {-5,-4,-3,-2,-1,0,1,2,3,4},
5 = -5 + 1*10 is the first number requiring two of these digits: -5,1.
A097150 is the same sequence but with the digits in reverse order.
Also, 45 = -5 - 5*10 + 1*10^2 has digits -5,-5,1,
54 = 4 - 5*10 + 1*10^2 has digits 4,-5,1 and
55 = -5 - 4*10 + 1*10^2 has digits -5,-4,1.
CROSSREFS
KEYWORD
base,easy,sign
AUTHOR
Rick L. Shepherd, Jul 27 2004
STATUS
approved