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!)
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

%I #21 Mar 03 2015 02:12:29

%S 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,

%T 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,

%U 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

%N 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)

%C Comments following discussions with _David Applegate_, May 05 2006: (Start)

%C 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).

%C (End)

%C 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

%C I suspect a(115) = 385592406, A117817(115) = 79560. Can someone confirm? - _Martin Fuller_, May 12 2006

%C 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

%H N. J. A. Sloane and others, <a href="/wiki/Sequences_of_RADD_type">Sequences of RADD type</a>, OEIS wiki.

%e T_2 enters a cycle of length 81 after 1 step.

%t 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_ *)

%o (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); L-1}

%Y 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.

%Y Cf. A117817.

%K sign,base

%O 1,12

%A _N. J. A. Sloane_, following discussions with Luc Stevens, May 04 2006

%E a(21)-a(33) from Luc Stevens, May 08 2006

%E a(33) onwards from _T. D. Noe_, May 10 2006

%E Further terms from _Martin Fuller_, May 12 2006

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 April 23 23:26 EDT 2024. Contains 371917 sequences. (Running on oeis4.)