Yes, so A209674 either needs to be defined on 1..99, 101..199, etc. or else have some special value for multiples of 100. Either way, the sequence is periodic. (The exact period depends on the convention chosen above, as well as how numbers 5 mod 100 are treated.) I do get different values for many terms, though, to wit: 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, 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, 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. using (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 Greathouse Analyst/Programmer Case Western Reserve University On Sun, Mar 11, 2012 at 3:04 PM, Eric Angelini <Eric.Angelini@kntv.be> wrote:
Thanks Neil -- I've omitted to say that integers ending in 00 (like 100, 1000...) are obviously not hitting 5...
________________________________________ De : math-fun-bounces@mailman.xmission.com [math-fun-bounces@mailman.xmission.com] de la part de Neil Sloane [njasloane@gmail.com] Date d'envoi : dimanche 11 mars 2012 19:55 À : math-fun Objet : Re: [math-fun] Hitting 5
Eric, Very nice! I just added A209674, which is the number of steps to reach 5. Neil
On Sun, Mar 11, 2012 at 2:23 PM, Eric Angelini <Eric.Angelini@kntv.be>wrote:
Start sequence S with any integer. If a(n) is the sum of the last two digits of S, S will always hit 5 at some point. Best, É.
_______________________________________________ math-fun mailing list math-fun@mailman.xmission.com http://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
-- Dear Friends, I will soon be retiring from AT&T. New coordinates:
Neil J. A. Sloane, President, OEIS Foundation 11 South Adelaide Avenue, Highland Park, NJ 08904, USA Phone: 732 828 6098; home page: http://NeilSloane.com Email: njasloane@gmail.com _______________________________________________ math-fun mailing list math-fun@mailman.xmission.com http://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun _______________________________________________ math-fun mailing list math-fun@mailman.xmission.com http://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun