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!)
A209674 For each n, define a sequence of numbers by S(0)=n, S(i) = sum of last two digits of the concatenation S(0)S(1)S(2)...S(i-1); a(n) = smallest m such that S(m) = 5, or -1 if 5 is never reached. 2

%I #31 Mar 05 2015 15:17:28

%S -1,4,9,9,5,0,4,3,10,11,5,3,2,6,1,5,8,7,9,6,10,7,8,1,7,4,3,10,6,4,10,

%T 2,1,8,5,8,7,6,4,3,6,1,4,7,4,3,6,4,3,7,1,9,11,5,8,6,4,3,7,2,5,8,7,4,6,

%U 4,3,7,2,6,4,10,5,6,4,3,7,2,6,9,11,7,6,4,3,7,2,6,9,8,12,6,4,3,7,2,6,9,8,10

%N For each n, define a sequence of numbers by S(0)=n, S(i) = sum of last two digits of the concatenation S(0)S(1)S(2)...S(i-1); a(n) = smallest m such that S(m) = 5, or -1 if 5 is never reached.

%C a(n) = -1 iff n ends in 00 (e.g. 100, 200, ...). (It is sufficient to check the 100 starts i,j, 0 <= i, j <= 9.)

%C 5 is the unique number common to the trajectories of all numbers from 1 to 99.

%C Iterate the map k -> A209685(k), starting at n, until reaching 5, or -1 if 5 is never reached.

%D Eric Angelini, Posting to Math Fun Mailing List, Mar 11 2012.

%F The sequence is ultimately periodic.

%e For n=4 we have S(0)=4, S(1)=4, S(2)=8, S(3)=12, S(4)=3, S(5)=5, so a(4)=5.

%o (PARI) a(n)=my(m=0,t,k);while(n!=5,t=if(n>9,n%100\10+n%10,n+m%10);m=n;n=t;k++);k \\ _Charles R Greathouse IV_

%Y Cf. A209685, A209686.

%K sign,base

%O 0,2

%A _N. J. A. Sloane_, Mar 11 2012

%E Corrected and extended by _Charles R Greathouse IV_, Mar 11 2012

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 18 06:24 EDT 2024. Contains 371769 sequences. (Running on oeis4.)