The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A117817 Let T_n be the infinite sequence formed by starting with 1 and repeatedly reversing the digits and adding n to get the next term. If T_n eventually reaches a cycle, sequence gives length of that cycle, otherwise -1. 72

%I #8 May 26 2014 23:48:47

%S 9,81,3,54,207,30,63,27,1,-1,9,15,18,72,-1,90,54,13,18,-1,15,9,9,36,

%T 45,18,9,36,18,-1,9,9,3,36,72,2,27,18,3,-1,18,57,63,9,22,90,18,30,54,

%U -1,6,99,54,13,36,207,12,63,45,-1,36,27,30,108,36,264,99,36,3,-1,18,22,45,90,12,45,117,192,18,-1,36,45,63,168,1008,36,24,306,9,-1,99,639,36,54,144,18,225,468,1,-1,18,300,189,171,765,90,45,462,90,-1,9,513,63,69

%N Let T_n be the infinite sequence formed by starting with 1 and repeatedly reversing the digits and adding n to get the next term. If T_n eventually reaches a cycle, sequence gives length of that cycle, otherwise -1.

%C a(multiple of 10) = -1 (see A117816). a(15) = -1 (see A118532). a(n) is a multiple of 9/gcd(9,n) unless it is -1. - _Martin Fuller_, May 12 2006

%C For a discussion of the -1 entries see A117816.

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

%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, Length[lst]-Position[lst,z][[1,1]]+1, -1], {n,100}] (Noe)

%Y See A117817 for the -1 entries and cross-references to T_1 through T_16.

%K sign,base

%O 1,1

%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_ and _Martin Fuller_, May 10 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 May 14 03:35 EDT 2024. Contains 372528 sequences. (Running on oeis4.)