login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A178049 The number of iterations of the map x -> x + d(x) to reach a repdigit (cf. A010785), starting at n, where the decimals of d(x) are the first differences of the decimals of x. 1
2, 1, 7, 6, 7, 5, 3, 6, 8, 4, 2, 2, 1, 5, 4, 7, 3, 3, 6, 8, 2, 2, 2, 1, 5, 4, 7, 3, 3, 6, 2, 2, 2, 2, 1, 5, 4, 3, 3, 3, 2, 2, 2, 2, 2, 1, 5, 4, 3, 3, 2, 2, 2, 2, 2, 2, 1, 4, 3, 3, 2, 2, 2, 2, 2, 2, 2, 1, 4, 3, 2, 2, 2, 2, 2, 2, 2, 2, 1, 3, 2, 2, 2, 2, 2, 2, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET
10,1
COMMENTS
Let the recurrence X(k+1) = X(k) + Y(k) with the initial values : X(0) = n, and {x(1), x(2),...,x(p) } is the decimal expansion of n ; Y(0) has the decimal expansion {y(2), y(3),...,y(p)} where y(i) = abs(x(i)- x(i-1)), i = 2,..., p. For n > = 10, a(n) is the number of iterations of Y(k) needed to reach 0.
According to the computations with the Maple program for big numbers, the recurrence converges. Y(k) tends towards zero after a number of finite iterations, and X(k) tends towards a number q with the decimal expansion {p,p, ...,p }.
LINKS
EXAMPLE
a(11) = 1 because 11 + (1-1) = 11 + 0, and 0 is obtained after the first iteration.
a(12) = 7 because 12 + 1 = 13 -> 13 + 2 = 15 -> 15 + 4= 19 -> 19 + 8 = 27-> 27 + 5 = 32 -> 32 + 1 = 33 -> 33 + 0 = 33 is the last number of the cycle, and 0 is obtained after the 7th iteration.
MAPLE
for n from 10 to 200 do:n0:=n:s:=1:for i from 1 to 10^6 while(s<>0) do:x:=convert(n0, base, 10):n1:=nops(x):s:=sum(abs(x[j+1]-x[j]), j=1..n1-1):n0:=n0+s:it:=i:od: printf(`%d, `, it):od:
CROSSREFS
Cf. A010785.
Sequence in context: A078301 A160201 A204912 * A257577 A060583 A246751
KEYWORD
nonn,base
AUTHOR
Michel Lagneau, May 18 2010
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 29 02:23 EDT 2024. Contains 371264 sequences. (Running on oeis4.)