Talk:Permuted multiples: Difference between revisions
Content added Content deleted
Line 24: | Line 24: | ||
At the above zhilongji notes "since x and 3x have the same digits,x%3 == 0 will always be true, so we can search with the start as 10^i+2,and the step as 3." which is correct--[[User:Nigel Galloway|Nigel Galloway]] ([[User talk:Nigel Galloway|talk]]) 15:24, 17 August 2021 (UTC) |
At the above zhilongji notes "since x and 3x have the same digits,x%3 == 0 will always be true, so we can search with the start as 10^i+2,and the step as 3." which is correct--[[User:Nigel Galloway|Nigel Galloway]] ([[User talk:Nigel Galloway|talk]]) 15:24, 17 August 2021 (UTC) |
||
== Incorrect extended output for Pascal == |
|||
As shown in the Phix entry, once you know the result for 6 digits longer examples can be found |
|||
by multiplying all of the one-digit-less by 10 and replacing the final trailing 0 with a 9 in |
|||
the middle, so for k (>=6) digits there are (at least) k-5 possible values for n: |
|||
<pre> |
|||
6 digits: 142857 |
|||
7 digits: 1428570 |
|||
1429857 |
|||
8 digits: 14285700 |
|||
14298570 |
|||
14299857 |
|||
9 digits: 142857000 |
|||
142985700 |
|||
142998570 |
|||
142999857 |
|||
10 digits: 1428570000 |
|||
1429857000 |
|||
1429985700 |
|||
1429998570 |
|||
1429999857 |
|||
</pre> |
|||
The Pascal entry would of course be correct under a "no repeated digits" rule. --[[User:Petelomax|Pete Lomax]] ([[User talk:Petelomax|talk]]) 09:04, 18 August 2021 (UTC) |