Talk:Amicable pairs: Difference between revisions

Visibility of task description formulae now restored
m (→‎amicable pairs, out of order: sorting vs. searching sequentially.)
(Visibility of task description formulae now restored)
 
(8 intermediate revisions by 3 users not shown)
Line 1:
==amicable pairs, out of order==
The following is the output from the REXX program (3rd entry) when specifying   '''12345672333444'''   (onetwo million +)   as the argument:
<pre>
220 and 284 are an amicable pair.
Line 46:
947835 and 1125765 are an amicable pair.
1154450 and 1189150 are an amicable pair.
1185376 and 1286744 are an amicable pair.
1156870 and 1292570 are an amicable pair.
1280565 and 1340235 are an amicable pair.
1175265 and 1438983 are an amicable pair.
1392368 and 1464592 are an amicable pair.
1328470 and 1483850 are an amicable pair.
1358595 and 1486845 are an amicable pair.
1511930 and 1598470 are an amicable pair.
1466150 and 1747930 are an amicable pair.
1468324 and 1749212 are an amicable pair.
1798875 and 1870245 are an amicable pair.
1669910 and 2062570 are an amicable pair.
2082464 and 2090656 are an amicable pair.
 
4457 amicable pairs found up to 12345672333444
</pre>
It clearly shows that some of the amicable pairs are "out of order". &nbsp; -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 20:34, 5 October 2015 (UTC)
Line 54 ⟶ 67:
 
:: Actually, the output isn't sorted at all, except in the sense that, when looking for the amicable pairs that were found, it finds the lowest number for the 2nd number in the pair. &nbsp; This is just an artifact of how the search was performed. &nbsp; -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 21:01, 5 October 2015 (UTC)
 
::: I think you mean that there was no post-process sorting algorithm used here. In other words, I think are talking about the structure of the algorithm rather than the structure of the data. Nevertheless, a statement such as <code>Do x=1 To 20000</code> generates values for x in a sorted order... --[[User:Rdm|Rdm]] ([[User talk:Rdm|talk]]) 01:03, 7 October 2015 (UTC)
 
:::: The &nbsp; '''do''' &nbsp; loop mentioned above (as used in the REXX program), like you said, generates values of &nbsp; '''x''' &nbsp; in a sorted order, but does not do any sorting of data (amicable numbers). &nbsp; However, what the &nbsp; '''do''' &nbsp; loop does, in reality, is generating values for &nbsp; '''x''' &nbsp; in numerical order, where &nbsp; '''y''' &nbsp; is coupled to the value of &nbsp; '''x''' &nbsp; (where &nbsp; '''x''' is the first part of the amicable pair, and &nbsp; '''y''' &nbsp; is the second part). &nbsp; However, the &nbsp; '''sigma''' &nbsp; of &nbsp; '''x''' &nbsp; most likely isn't known at this time, so the value of &nbsp; '''x''' &nbsp; isn't displayed until the &nbsp; '''sigma''' &nbsp; of &nbsp; '''y''' &nbsp; is computed, thus, the values of &nbsp; '''x''' &nbsp; are shown out of order, even though one would think that the values of &nbsp; '''x''' &nbsp; should appear in numerical order. &nbsp; -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 01:58, 7 October 2015 (UTC)
 
<!-- Like baseball, the runner on 1st can't run to 2nd until the runner on 2nd advances to 3rd. Apologies for the similarity to the Abbot and Costello routine. -->
 
:::: Ok. Are you suggesting that one or more of the rexx implementations would discover the &nbsp; '''y''' &nbsp; values "out of order"? --[[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 03:38, 7 October 2015 (UTC)
 
:::: In fact, all of the REXX versions that I entered show the &nbsp; '''y''' &nbsp; values in order. &nbsp; -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 03:38, 7 October 2015 (UTC)
 
 
==All formulae up to Example rendered invisible to many browsers by white-space tidying==
 
Under-tested cosmetic edits at 18:44, 11 September 2016, including the injection of redundant spaces into &lt;math&gt; tags rendered all formulae before the word '''example''' completely invisible to all browsers which display the graphic file version of formulae rather than processing the MathML (this is, in fact, the majority of browsers). The MediaWiki processor does not currently expect such spaces, and generates syntactically ill-formed HTML if they are introduced. Other aspects of this cosmetic edit may have further compounded the problem [[User:Hout|Hout]] ([[User talk:Hout|talk]]) 16:27, 20 September 2016 (UTC)
 
: Visibility of task description formulae now restored. This has entailed reverting the task description to its state before the under-tested cosmetic edits of 18:44, 11 September 2016, which left formulae invisible to most browsers on all platforms. The author of these cosmetic interventions is welcome to fine-tune, but will need to test the real effects of any edits in the main class of browsers (which display the server-side formula graphic) as well as in the minority class (e.g. FireFox), which (installed fonts permitting) process MathML locally. [[User:Hout|Hout]] ([[User talk:Hout|talk]]) 15:25, 22 October 2016 (UTC)
9,655

edits