

A207505


Start with n, successively subtract the next digit of the resulting sequence, stop when reaching zero or less: a(n) is the absolute value of the result.


3



0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 0, 0, 1, 0, 1, 2, 3, 4, 5, 0, 0, 7, 0, 0, 1, 0, 0, 7, 6, 6, 6, 3, 2, 1, 0, 0, 1, 0, 4, 3, 2, 1, 1, 0, 0, 2, 1, 5, 4, 2, 0, 2, 1, 0, 2, 0, 0, 4, 2, 0, 1, 1, 7, 4, 1, 0, 4, 3, 0, 2, 0, 2, 1, 0, 0, 7, 1, 1, 3, 0, 1, 4, 3, 2, 2, 5, 2, 6, 1, 2, 5, 0, 4, 3, 2, 1, 0, 7, 6, 5, 5, 2, 5, 5, 1, 3, 3, 4, 1, 3, 0, 6, 0, 5, 3, 8, 3, 5, 4, 4, 4, 3, 2
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,13


COMMENTS

These numbers have been named "miss numbers" by Hans Havermann, and the individual sequences are called "Digit trails" by Eric Angelini, who asked for those which end in 0 (now listed in A207506).
If we don't stop when reaching a negative number but keep going, it appears that we always do reach 0 eventually  see A208059.


LINKS

H. Havermann, Table of n, a(n) for n = 0..10000
H. Havermann, in reply to E. Angelini, Re: Subtracting digits, hitting zero, seqfan mailing list, Feb 16 2012


EXAMPLE

35 hits 0 when successively subtracting its own "digittrail":
a b c
353=32
325=27
273=24
242=22
222=20
207=13
132=11
114= 7
72= 5
52= 3
32= 1
10= 1
11= 0 < hit
We get column b by reading column a digitbydigit.
So we have 35 > 32 > 27 > 24 > 22 > 20 > 13 > 11 > 7 > 5 > 3 > 1 > 1 > 0
However, we may not hit 0 exactly, but reach a negative number instead. For n=11, the digit trail sequence is 11, 10, 9, 8, 8, 1, where we stop, and so a(11)=1.


PROG

(PARI) A207505(n, v=0, a=[])={ v&print1(n); a=Vec(Str(n)); while(n>0, a=concat( vecextract(a, "^1"), Vec( Str( n=eval( a[1] )))); v&print1(", "n)); n}


CROSSREFS

Cf. A207506, A208059.
Sequence in context: A283001 A037851 A037887 * A235049 A031087 A010878
Adjacent sequences: A207502 A207503 A207504 * A207506 A207507 A207508


KEYWORD

nonn,base


AUTHOR

Hans Havermann, Eric Angelini and M. F. Hasler, Feb 18 2012


EXTENSIONS

Edited by N. J. A. Sloane, Jun 01 2012


STATUS

approved



