OFFSET
0,11
COMMENTS
This is the same procedure used in A207505 with an allowance made to continue the process if we miss zero and enter negative territory on our initial downward run. A downward run will succumb to an upward run, and vice versa, with each run presenting another opportunity to hit zero. (A random-digit trail entails, per run, a 1 in 5 chance of hitting zero.)
a(23) was first computed by Nicolas Berr. According to his calculations, a(40) does not hit zero in its first 15 sign-change crossings. The 16th crossing is ~2*10^15.
If a negative number appears in column a, say -107, then in column b we write successively -1, 0, -7.
As far as I know, it is only a conjecture that for any starting value n we always reach a 0. - N. J. A. Sloane, Jun 01 2012
a(40) (at least 10^15) is the smallest unknown value.
LINKS
Eric Angelini, Miss Numbers, Feb 2012
Eric Angelini, Miss Numbers [Cached copy, with permission]
Christopher Creutzig, A208059 analogues (bases 2-16)
Christopher Creutzig, A208059 analogues (bases 2-16) [Cached copy made Jun 01 2012]
Hans Havermann, A208059 evolutions
EXAMPLE
When successively subtracting its own digit-trail, 12 requires 14 steps to hit its first zero, achieved on its first upward run, thus making a(12) = 14:
.a.....b......c
12 - 1 = 11
11 - 2 = 9
9 - 1 = 8
8 - 1 = 7
7 - 9 = -2
-2 - 8 = -10
-10 - 7 = -17
-17 -(-2) = -15
-15 -(-1) = -14
-14 -(-0) = -14
-14 -(-1) = -13
-13 -(-7) = -6
-6 -(-1) = -5
-5 -(-5) = 0
etc., ad infinitum.
We get column b by reading column a digit-by-digit.
MATHEMATICA
f[n_] := Module[{x = n, l, c}, c = 0; l = IntegerDigits[x];
While[x != 0, c++; x = x - First[l];
l = Join[Rest[l], Sign[x]*IntegerDigits[x]]; ]; c] ;
Table[f[n], {n, 0, 22}] (* Robert Price, Apr 04 2020 *)
PROG
(PARI) A208059(n, v=0/*verbose: print all terms if >0*/, a=[])={ v&print1(n); a=eval(Vec(Str(n))); for(c=0, 9e9, n|return(c); a=concat(vecextract(a, "^1"), eval(Vec(Str(abs(n-=a[1]))))*sign(n)); v&print1(", "n)) } \\ M. F. Hasler, Mar 03 2012
CROSSREFS
KEYWORD
nonn,base,more
AUTHOR
Hans Havermann, Feb 23 2012
EXTENSIONS
More terms from Hans Havermann, Mar 06 2012
Edited by N. J. A. Sloane, Jun 01 2012
STATUS
approved