Hi,<br><br>Below is the PARI/GP program, which for all n (n>1) acts as someFunction(n), mentioned by me in the previous email. <br>It takes "n" as an input and returns back "s=n" - but it does it not in the direct trivial assignment way, but rather via using intermediate computations, involving, described by me in the previous email, interchanging 6 or 4 periodicity pattern and also computing floor(n*n/10)+10 .
<br><br>alex(n) =<br> { local( u = 1, t=0,l=0, s=0, i=0);<br>  for(j=1,n,<br>   i=i++;<br>   print1("before loop1");<br>   print1("i="i" ");<br>   if(n<=7,t=7-n);<br>   if(n<=7,break);<br>
   if(i<=7,next(1));   <br>   for (k = 1, 6,<br>     print1("loop1");<br>     if(k!=1,i++);<br>     print1("i="i" ");<br>     print1("l="l" ");<br>     t = t + l;<br>     print1("t="t" ");
<br>     if(i>=n,break);<br>       );<br>   if(i>=n,break);<br>   print1("l="l" ");<br>     i++;<br>     if(i>=14,l=l+1);<br>   for (k = 1, 4,<br>     print1("loop2");<br>     if(k!=1,i++);
<br>     print1("i="i" ");<br>     print1("l="l" ");<br>     t = t + l;<br>     print1("t="t" ");<br>    if(i>=n,break);<br>   );<br>  if(i>=n,break);<br>  if(i>=14,l++);
<br>  print1("l="l" ");<br>  );<br>   print1("n="n" ");<br>   print1("i="i" ");<br>  print1("t="t" "); <br>  s=floor(((floor(n*n/10)+10) -t )/2);
<br>  print1("s="s" ");<br> }<br><br>Thanks,<br>Best Regards,<br>Alexander R. Povolotsky<br><br><div class="gmail_quote">On Jan 11, 2008 2:27 PM, Alexander Povolotsky <<a href="mailto:apovolot@gmail.com">
apovolot@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div>Thanks for the reply,  Franklin,</div>
<div> </div>
<div>Could you also explain why the pattern (at least up to n=60) keeps steadily alternating between 4 terms and 6 terms in the each two consecutive groups, with the difference remaining the same within each such 4-term or 6-term group (while during the switch from the 4-group to the 6-group and then back to the next 4-group, etc. the difference is getting bumped by 1) ?  
</div>
<div>How you explain the fact that the sum of number of terms for each two consecutive groups is  4+ 6= 10 ?</div>
<div> </div>
<div>Note that if the pattern indeed could be described as discuseed in the predictable manner,</div>
<div>then one could resolve the iteration and derive the following formula (non trivial identity ?)</div>
<div> </div>
<div>n = (floor(n*n/10)+10 - someFunction(n) ) /2</div>
<div> </div>
<div>Thanks,</div>
<div>Alexander R. Povolotsky<br> </div><div><div></div><div class="Wj3C7c">
<div><span class="gmail_quote">On 1/11/08, <b class="gmail_sendername"><a href="mailto:franktaw@netscape.net" target="_blank">franktaw@netscape.net</a></b> <<a href="mailto:franktaw@netscape.net" target="_blank">franktaw@netscape.net
</a>> wrote:</span>

<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;">It's pretty much obvious.<br><br>First of all, simple arithmetic lets us simplify the expression to
<br>
<br>a(n) = floor(n^2/10) - floor((n-1)^2/10) + 2<br><br>The "+ 2" obviously doesn't affect the pattern of differences,<br>so what we are really looking at is the pattern of differences in<br>floor(n^2)/10.   Since the final digit of n^2 depends only
<br>on n modulo 10, and the difference in the squares is 2n-1, this<br>will have a pattern of changes depending only on the final<br>digit.<br><br>Franklin T. Adams-Watters<br><br>-----Original Message-----<br>From: Alexander Povolotsky 
<a href="mailto:apovolot@gmail.com" target="_blank">apovolot@gmail.com</a><br>.<br>Consider calculating (in decimal system):<br><br>floor(n*n/10) + 10<br><br>and then looking between the  difference of calculated above and
<br>"doubled" value of n :
<br><br>(floor(n*n/10) + 10)  - 2*n<br><br>and then look at the differences between in above expression for two<br>consecutive integers n and (n-1)<br><br>a(n) = ((floor(an*n/10) + 10) - 2*n) - ((floor((n-1)*(n-1)/10) + 10 -
<br>2*(n-1))<br>...<br><br>So you could notice that starting from a(4) and on - the difference is<br>kept the same for first 4 terms and then the difference gets<br>incremented by 1 and as such is kept constant for next 6 terms, then it
<br>increments by 1 again and is kept the same for 4 terms, etc, etc ....<br>...<br>Is this well known and/or obvious ?<br>____________________________________________________________________<br></blockquote></div><br>
</div></div></blockquote></div><br>