Talk:Rare numbers: Difference between revisions

Content added Content deleted
Line 13: Line 13:
::*   when the number of digits in a rare number is ''even'',   the   '''sum'''   must be divisible by   '''11''',     and
::*   when the number of digits in a rare number is ''even'',   the   '''sum'''   must be divisible by   '''11''',     and
::*   when the number of digits in a rare number is   ''odd'',   the   '''difference'''   must be divisible by   '''9'''.
::*   when the number of digits in a rare number is   ''odd'',   the   '''difference'''   must be divisible by   '''9'''.

===20 mins not 20 years===
If Shyam Sunder Gupta has really spent 20 years on this he should have stayed in bed. Let me spend 20mins on it. The following took 9mins so any questions and I have 11mins to spare.
<pre>
Let me consider n-r=l for a 2 digit number ng n<g. Then l=(10g+n)-(g+10n)=9(g-n) where n is 0..8 and g is 1..9.
l is one of 9 18 27 36 45 54 63 72 81. l must be a perfect square so only 9 36 and 81 are of interest.

9 -> ng=89 78 67 56 45 34 23 12 01
36-> ng=59 48 37 26 15 04
81-> ng=09

For each of these candidate ng I must determine if ng+gn is a perfect square.

09+90 99 n
59+95 154 n
48+84 132 n
37+73 110 n
26+62 114 n
15+51 66 n
04+40 40 n
89+98 187 n
78+87 165 n
67+76 143 n
56+65 121 y
45+54 99 n
34+43 77 n
23+32 55 n
12+21 33 n
01+10 11 n

From which I see that 65 is the only Rare 2 digit number.

I love an odd number of digits. Let me call the 3 digit number nxg. l=(100g+10x+n)-(g+10x+100n).
x disappears and I am left with 99(g-n). None of 99 198 297 396 495 594 693 792 or 894 are perfect squares.
So there are no Rare 3 digit numbers.

At 4 I begin to think about using a computer. Consider nige. l=(1000e+100g+10i+n)-(e+10g+100i+1000n).
I need a table for l as above for 9(111(e-n)+10(g-i)) where n<=e and if n=e then i<g.

Before turning the computer on I'll add that for 5 digits nixge l=(10000e+1000g+100x+10i+n)-(e+10g+100x+1000i+10000n).
x dissappears leaving 99(111(e-n)+10(g-i))
</pre>--[[User:Nigel Galloway|Nigel Galloway]] ([[User talk:Nigel Galloway|talk]]) 13:34, 12 September 2019 (UTC)


== the 1<sup>st</sup> REXX version ==
== the 1<sup>st</sup> REXX version ==