

A117816


Number of steps until the RADD sequence T(k+1) = n + R(T(k)), T(0) = 1, enters a cycle; 1 if no cycle is ever reached. (R=A004086: reverse digits)


73



1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 31, 15, 1, 721, 9, 1, 6, 1, 3, 5, 28, 29, 131, 23, 1, 31, 6, 1, 1, 19, 1, 53, 4, 406, 34, 254, 8, 1, 3, 245, 1, 3, 2, 422, 42, 308, 1, 1, 2, 2, 49, 1, 1371, 13, 1, 1, 2, 1, 78, 65, 1, 809, 1575, 5, 43, 31, 2, 1, 33, 2, 21, 192, 857, 91, 1, 2, 2, 1, 2, 491, 1, 2, 1, 81, 49, 1, 2, 1, 35, 197, 72, 1, 12, 79, 1, 6004, 1, 1, 52, 10264, 9, 28, 2, 2, 1, 427, 1, 1, 1, 1, 49, 167
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,12


COMMENTS

Comments following discussions with David Applegate, May 05 2006: (Start)
Certainly a(10) = 1 and probably a(n) is always 1 if n is a multiple of 10. Furthermore a(15) is almost certainly 1: T_15 has not reached a cycle in 10^7 terms (see A118532).
(End)
If n is a multiple of 10 the operation can never generate a trailing zero and so is reversible. So it loops only if it returns to the start, which is impossible. Hence a(10k) = 1.  Martin Fuller, May 12 2006
I suspect a(115) = 385592406, A117817(115) = 79560. Can someone confirm?  Martin Fuller, May 12 2006
The map f: x > R(x)+n is injective, f(x)=f(y) <=> R(x)=R(y) <=> x=y, unless x or y only differ in trailing zeros. For n=10k, however, trailing zeros can never occur. (This also implies that the terms are of increasing length.) Thus, for n=10k, no number can occur twice in the orbit of 1 under f, i.e., a(10k)=1. A sketch of proof for a(15)=1 is given in A118532. As of today, no other n with a(n)=1 seems to be known.  M. F. Hasler, May 06 2012


LINKS

Table of n, a(n) for n=1..114.
N. J. A. Sloane and others, Sequences of RADD type, OEIS wiki.


EXAMPLE

T_2 enters a cycle of length 81 after 1 step.


MATHEMATICA

ReverseNum[n_] := FromDigits[Reverse[IntegerDigits[n]]]; maxLen=10000; Table[z=1; lst={1}; While[z=ReverseNum[z]+n; !MemberQ[lst, z] && Length[lst]<maxLen, AppendTo[lst, z]]; If[Length[lst]<maxLen, Position[lst, z][[1, 1]]1, 1], {n, 100}] (* T. D. Noe *)


PROG

(PARI) A117816(n, L=10^5, S=1)={ for(F=0, 1, my(u=Vecsmall(S)); while(L & #u<#u=vecsort(concat(u, Vecsmall(S=A004086(S)+n)), , 8), ); L  F=1; /* 1st run counts until repetition, now subtract cycle length */ F  L=1+#u); L1}


CROSSREFS

For T_1, T_2, ..., T_16 (omitting T_9, which is uninteresting) see A117230, A117521, A118517, A117828, A117800, A118525, A118526, A118527, A117841, A118528, A118529, A118530, A118531, A118532, A118533.
Cf. A117817.
Sequence in context: A221192 A178194 A069460 * A237263 A099189 A247099
Adjacent sequences: A117813 A117814 A117815 * A117817 A117818 A117819


KEYWORD

sign,base


AUTHOR

N. J. A. Sloane, following discussions with Luc Stevens, May 04 2006


EXTENSIONS

a(21)a(33) from Luc Stevens, May 08 2006
a(33) onwards from T. D. Noe, May 10 2006
Further terms from Martin Fuller, May 12 2006


STATUS

approved



