Talk:Permuted multiples: Difference between revisions

 
(11 intermediate revisions by 4 users not shown)
Line 22:
==Ranges to be checked==
I've added a comment to [https://www.mathblog.dk/project-euler-52-integer-same-digits/ Project Euler solutions C# 52] which is awaiting moderation: "The ranges to be checked can be reduced to 10^n->(10^(n+1))/6 i.e 10000->16666 because 16667*6 contains an extra digit.". So fingers crossed I've got that right.--[[User:Nigel Galloway|Nigel Galloway]] ([[User talk:Nigel Galloway|talk]]) 15:01, 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)
 
Extending this for bases other than 10 then for an n digit number the range is (base<sup>n-1</sup>+step-1)<sub>base</sub>..step<sub>base</sub>..(base<sup>(n)</sup>/max multiplier)<sub>base</sub>, step is the lcm of the multipliers which meet the condition (base-1)%multiplier=0. So for 10 digit numbers with multipliers 1..7 and in base 13: 100000000B<sub>13</sub>..C<sub>13</sub>..1B1B1B1B1B<sub>13</sub>. Note that the digital root of the candidates is step--[[User:Nigel Galloway|Nigel Galloway]] ([[User talk:Nigel Galloway|talk]]) 11:40, 20 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)
:Yes, that was my faulty approach.I used the array of digits and permute them after the leading "1".<BR>But now we can see, that only an extention by multible "0" or insertion of "Base-1" within the biggest number found, leads to more digits.
<pre>Base 10
With 6 digits
1x :142857
2x :285714
3x :428571
4x :571428
5x :714285
6x :857142
rekCount 10725
With 7 digits //142857 extended by "0"
1x :1428570
2x :2857140
3x :4285710
4x :5714280
5x :7142850
6x :8571420
rekCount 50244
With 7 digits //142857 extended by "9"
1x :1429857
2x :2859714
3x :4289571
4x :5719428
5x :7149285
6x :8579142
rekCount 50469
With 8 digits //142857extended by "0" and "9"
1x :14298570
2x :28597140
3x :42895710
4x :57194280
5x :71492850
6x :85791420
rekCount 192563
 
Base 13
With 10 digits
1x :12495BA837
2x :2495BA8371
3x :3712495BA8
4x :495BA83712
5x :5BA8371249
6x :712495BA83
7x :83712495BA
rekCount 41174743
With 11 digits
1x :12495BA8370 //12495BA837 extended by "0"
2x :2495BA83710
3x :3712495BA80
4x :495BA837120
5x :5BA83712490
6x :712495BA830
7x :83712495BA0
rekCount 170444721
With 11 digits //12495BA837 extended by "C" aka Base-1
1x :12495CBA837
2x :2495BCA8371
3x :37124C95BA8
4x :495BAC83712
5x :5BA83C71249
6x :71249C5BA83
7x :83712C495BA
rekCount 170449012</pre>
But for Base = 14, maybe i shall test further til 11x
<pre>With 14 digits
1x :18075D6C4B3A29
2x :3210BCDA987654
3x :4A183C6905B27D
4x :64219BD7530CA8
5x :7C291B65A048D3
6x :96327AD40B851C
7x :B039DA6258C147
8x :C84359D0A61B72
rekCount 26733588778
With 14 digits
v=v are swapped
1x :18076D5C4B3A29
2x :3210DCBA987654
3x :4A186C3905B27D
4x :6421DB97530CA8
5x :7C296B15A048D3
6x :9632DA740B851C
7x :B03A69D258C147
8x :C843D950A61B72
rekCount 26734671088</pre>
-[[User:Horst.h|Horst.h]] ([[User talk:Horst.h|talk]]) 10:06, 18 August 2021 (UTC)
::That is curious. You may be interested to know there ''are'' in fact zillions of base 2 solutions, the first 11 with decimal equivalents in the right hand column are shown below, and it appears that k-5 aspect is at least initially holding:
<pre>
{{`000111`, 7},
{`001110`, 14},
{`010101`, 21},
{`011100`, 28},
{`100011`, 35},
{`101010`, 42}}
{{`0001110`, 14},
{`0011100`, 28},
{`0101010`, 42},
{`0111000`, 56},
{`1000110`, 70},
{`1010100`, 84}}
{{`0001111`, 15},
{`0011110`, 30},
{`0101101`, 45},
{`0111100`, 60},
{`1001011`, 75},
{`1011010`, 90}}
{{`00011100`, 28},
{`00111000`, 56},
{`01010100`, 84},
{`01110000`, 112},
{`10001100`, 140},
{`10101000`, 168}}
{{`00011110`, 30},
{`00111100`, 60},
{`01011010`, 90},
{`01111000`, 120},
{`10010110`, 150},
{`10110100`, 180}}
{{`00011111`, 31},
{`00111110`, 62},
{`01011101`, 93},
{`01111100`, 124},
{`10011011`, 155},
{`10111010`, 186}}
{{`000101101`, 45},
{`001011010`, 90},
{`010000111`, 135},
{`010110100`, 180},
{`011100001`, 225},
{`100001110`, 270}}
{{`000111000`, 56},
{`001110000`, 112},
{`010101000`, 168},
{`011100000`, 224},
{`100011000`, 280},
{`101010000`, 336}}
{{`000111100`, 60},
{`001111000`, 120},
{`010110100`, 180},
{`011110000`, 240},
{`100101100`, 300},
{`101101000`, 360}}
{{`000111110`, 62},
{`001111100`, 124},
{`010111010`, 186},
{`011111000`, 248},
{`100110110`, 310},
{`101110100`, 372}}
{{`000111111`, 63},
{`001111110`, 126},
{`010111101`, 189},
{`011111100`, 252},
{`100111011`, 315},
{`101111010`, 378}}
</pre>
::Our collective "1st digit must be 1" assumption is starting to look decidedly wrong. --[[User:Petelomax|Pete Lomax]] ([[User talk:Petelomax|talk]]) 17:03, 18 August 2021 (UTC)
:::"Our collective "1st digit must be 1" assumption is starting to look decidedly wrong."<BR>But I don't think so.How will you determine the count of digits with trillions of "0" in front ;-)<BR>But it would be nice, not to fix to "1", if the base is 13 then "2" at start can succeed in 1x..6x -[[User:Horst.h|Horst.h]] ([[User talk:Horst.h|talk]]) 17:56, 18 August 2021 (UTC)
 
==Step counts in Phix==
Hi Pete. I don't know if it's deliberate, but your step counts don't include the steps which actually find the numbers. --[[User:Nig|Nig]] ([[User talk:Nig|talk]]) 10:57, 18 August 2021 (UTC)
 
:Semi-deliberate - for me the first place I look is zero steps away. However the "bump" ''is'' arguably a step. So I'm left with two choices: either increment steps before the i=7 check, or reset steps to 1 on bump. Since I can't quite decide, and it's not really important, I'll do neither. --[[User:Petelomax|Pete Lomax]] ([[User talk:Petelomax|talk]]) 13:08, 18 August 2021 (UTC)
2,171

edits