<HTML>
<HEAD>
<TITLE>Re: [math-fun] Sum of last ten digits</TITLE>
</HEAD>
<BODY>
<FONT FACE="Courier, Courier New"><SPAN STYLE='font-size:18.0px'><BR>
Hi,<BR>
Concerning the loopings of sequences like:<BR>
<FONT COLOR="#800080"><BR>
<BR>
%S A112395 0,0,0,0,0,0,0,0,0,1,1,2,4,8,16,23,28,37,44,40,37,42,38,39,43,46,46,50,<BR>
%N A112395 Next term is the sum of the last 10 digits in the sequence.<BR>
%C A112395 There are only 10^10 possibilities for the last 10 digits, so the sequence must eventually cycle.<BR>
%C A112395 Terms computed by Gilles Sadowski.<BR>
%e A112395 0 + 0 + 1 + 1 + 2 + 4 + 8 + 1 + 6 = 23<BR>
%A A112395 Eric Angelini (eric.angelini(AT)kntv.be), Dec 05 2005<BR>
</FONT><BR>
-----------<FONT COLOR="#800000">Hans:<BR>
In fact, terms 19-23 (44, 40, 37, 42, 38) are repeated by terms 331-335 already.<BR>
</FONT> <BR>
-----------<FONT COLOR="#000080">Alexandre:<BR>
It seems the shortest loop of Éric Angelini's < sum of last ten digits > can be found beginning with 9, and has a lenght of 1 term:<BR>
0 0 0 0 0 0 0 0 0 9 9 18 27 36 45 54 45 45 45 45 45 45 45 45 45 <BR>
</FONT><BR>
-----------<FONT COLOR="#0000FD">Graeme<BR>
Searching randomly, I found that:<BR>
A loop of length 8 is possible, starting at 0, 6, 1, 8, 7, 8, 6, 6, 3, 0.<BR>
A loop of length 24 is possible, starting at 0, 4, 2, 1, 9, 7, 1, 7, 7, 4.<BR>
A loop of length 26 is possible, starting at 2, 3, 2, 7, 0, 9, 8, 7, 8, 4.<BR>
A loop of length 78 is possible, starting at 2, 2, 5, 2, 6, 0, 3, 8, 5, 7.<BR>
</FONT><BR>
-----------<FONT COLOR="#008080">Hans <BR>
For example, starting with '0,0,0,0,0,0,0,0,1' and letting the  <BR>
sequence reflect the sum of the last '9 digits' (instead of 10) the  <BR>
loop-size is 12203 (starting with term 14250), in stark contrast to  <BR>
A112402's loop-length of only 312.<BR>
</FONT><BR>
<BR>
<BR>
I asked to Michael D Beeler if he could do the same job (as he did before in different bases, all beginning with 0,0,...0, 1), but here starting with s-1 zeros followed by a 2, a 3, ...a 9?<BR>
Here is his complete answer in base 10. Some patterns...<BR>
And sequences style "Lenght of loop for s=n beginning with (s-1) zero's followed by the digit i"<BR>
<BR>
Best.<BR>
Alexandre<BR>
<BR>
------ Message transféré<BR>
<BR>
Yes, it is not hard to get the cases you ask about.<BR>
The results are below.  I am assuming you are interested<BR>
only in decimal (radix = base = b = 10).  In the table<BR>
below, "digit" is the first non-zero digit.  So digit=1<BR>
is identical to the original problem.<BR>
<BR>
        s=2 s=3 s=4 s=5 s=6 s=7 s=8   s=9 s=10<BR>
digit=1   8   4  50 171  14 461  78 12203  312<BR>
digit=2   8  10  50 171  39 461  78 12203  312<BR>
digit=3   8  10  12 171  13 461  26 12203  104<BR>
digit=4   8   4  50 171  39 461  78 12203  312<BR>
digit=5   8   4  50  63  39 461  78 12203  312<BR>
digit=6   8  10  12 171  69 461  26 12203  104<BR>
digit=7   3  15  50 171  69 461  78 12203  312<BR>
digit=8   8   4  50 171  39 461  78 12203  312<BR>
digit=9   8  10   1 171   1 461   1 12203    1<BR>
<BR>
           s=11  s=12   s=13  s=14  s=15  s=16<BR>
digit=1  318880  2184  57725  5804  1401  9722<BR>
digit=2  318880  2184  57725  5804  1401  3251<BR>
digit=3  318880   728  57725  5804  6698  9722<BR>
digit=4  318880  2184  57725  5804  1401  3251<BR>
digit=5  318880  2184  57725  5804  6698  9722<BR>
digit=6  318880   728  57725  5804  6698  9722<BR>
digit=7  318880  2184  57725  5804  6698  5091<BR>
digit=8  318880  2184  57725  5804  1401  9722<BR>
digit=9  318880     1  57725     1  6698     1<BR>
<BR>
For example, with s=3 and digit=7, the sequence begins<BR>
0 0 7 and falls into a loop that is 15 terms long.<BR>
<BR>
Of course, just because one loop has the same number<BR>
of terms as another, that does not mean they are the<BR>
same loop.  (0 0 0 7) and (0 0 0 8) each fall into<BR>
loops of 50 terms, but they might be different loops.<BR>
I did not investigate whether any of the same loop-lengths<BR>
in the table above are actually the same loop.<BR>
<BR>
There certainly are some curious patterns in the table.<BR>
<BR>
In number sequences like this, I think decimal is kind of<BR>
an arbitrary radix.  That's why in my previous message I<BR>
generalized to various radixes.  But computing a table<BR>
like that above for several different radixes is a bit<BR>
of work, and might be overwhelming in the volume of data.<BR>
Maybe it is nice to stay with decimal when varying the<BR>
first non-zero digit.<BR>
<BR>
Regards,<BR>
-- Mike<BR>
<BR>
</SPAN></FONT>
</BODY>
</HTML>