Talk:Permuted multiples: Difference between revisions

From Rosetta Code
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)

Revision as of 09:04, 18 August 2021

Can we reuse Project Euler problems?

It appears under their Copyright terms we can do so as long as suitable attribution is given. However, if I am wrong about this, then the draft task should of course be deleted. --PureFox (talk) 09:03, 17 August 2021 (UTC)

Just because a problem/puzzle appears on   Project Euler   doesn't mean they own it.   I've seen some of their problems that have been around on newsgroups   (alt.math.recreational, alt.puzzles, etc)   of days long gone by.     -- Gerard Schildberger (talk) 10:12, 17 August 2021 (UTC)
I'm sure you're right and some problems may go back as far as Diophantus though Project Euler may be the first organization to apply copyright to them. I can't see any reason not to reuse the occasional problem myself as long as we don't make a habit of it - I don't think the admins would be too happy if Calmosoft decided to run through the whole lot! --PureFox (talk) 10:30, 17 August 2021 (UTC)
There is some historical precedent. First power of 2 that has leading decimal digits of 12 is a Project Euler problem. There may be some others but none come to mind immediately. The point of Project Euler though, is to work out how to do the problems yourself, not to provide finished examples for other people to see. As such, I would prefer to not have too many Project Euler problems duplicated here. Not that I could prevent it if the community goes that way. I have pretty much stopped trying to moderate task submissions except for the most blatant plagiarisms / infringing works. (I do wish Calmosoft would spend more of his effort in solving some of the unimplemented Ring tasks rather than persisting in adding trivial variations of existing tasks or plagiarized content. And, it is somewhat telling that as soon as trivial or plagiarized comes up, his name comes to mind.) --Thundergnat (talk) 12:00, 17 August 2021 (UTC)
If these three sites do not attract disapprobation I don't think our use will: Project Euler solutions Java Mathmatica Python Haskell; Project Euler solutions C#; Project Euler solutions C++. The Haskell wiki has hundreds of examples from Project Euler. These sites do at least look at the mathematics, and produce efficient solutions, which is the intent of Project Euler while the content on this site is often flaky but...--Nigel Galloway (talk) 14:09, 17 August 2021 (UTC)

There are common tasks on Rosetta Code and Project Euler.
For example:
Lychrel numbers on Rosetta Code
Lycher numbers on Project Euler (Problem #55)--CalmoSoft (talk) 12:05, 17 August 2021 (UTC)

Exploring the same concept is not duplication / plagiarism. Using the exact same wording to solve the exact same problem is. --Thundergnat (talk) 12:29, 17 August 2021 (UTC)
You are right.--CalmoSoft (talk) 12:34, 17 August 2021 (UTC)

Ranges to be checked

I've added a comment to 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.--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--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:

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

The Pascal entry would of course be correct under a "no repeated digits" rule. --Pete Lomax (talk) 09:04, 18 August 2021 (UTC)