|
|
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
|
|
|
EXAMPLE
|
35 hits 0 when successively subtracting its own "digit-trail":
a b c
35-3=32
32-5=27
27-3=24
24-2=22
22-2=20
20-7=13
13-2=11
11-4= 7
7-2= 5
5-2= 3
3-2= 1
1-0= 1
1-1= 0 <- hit
We get column b by reading column a digit-by-digit.
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.
|
|
MATHEMATICA
|
f[n_] := Module[{x = n, l}, l = IntegerDigits[x];
While[x > 0, x = x - First[l];
l = Join[Rest[l], IntegerDigits[x]]; ]; Abs[ x]] ;
|
|
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
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|