Talk:Truncatable primes: Difference between revisions

From Rosetta Code
Content added Content deleted
m (added a new section [==redefinition of truncatable primes==]. -- ~~~~)
Line 22: Line 22:
<br>or some such wording.
<br>or some such wording.
<br>As an alternative, could MathWorld™'s definition be used? -- [[User:Gerard Schildberger|Gerard Schildberger]] 16:17, 12 September 2012 (UTC)
<br>As an alternative, could MathWorld™'s definition be used? -- [[User:Gerard Schildberger|Gerard Schildberger]] 16:17, 12 September 2012 (UTC)

:Hi Gerard, there is nothing in the task description implying a base at all and so usually we mean base ten. People talk about "the prime numbers" meaning the prime numbers in base ten without having to explicitly mention it and without confusion. You're not incorrect, (sorry about the double negative); but is it necessary. --[[User:Paddy3118|Paddy3118]] 18:38, 12 September 2012 (UTC)

Revision as of 18:38, 12 September 2012

Is Zero allowed?

I think the task should explicitly state whether zero is allowed in the numbers or not. If allowed then 999907 is the largest left-truncatable prime less than 1000000. --Tikkanz 00:58, 9 September 2010 (UTC)

Thanks Tikkanz. I've disallowed zero as this is done in part of the Mathworld article. It means disallowing '07' as being a prime for example, and seems reasonable. --Paddy3118 03:27, 9 September 2010 (UTC)

OEIS

For reference, a few of the related OEIS sequences are A024770 (right) and A024785 (left).

Phantom Category

I was trying to test cleaning up some categories of tasks (see Rosetta_Code:Village_Pump/Grouping_tasks) and thought I'd start with Primes, Prime, and Prime Numbers. So I added Category:Prime Numbers but low and behold I can't find where Truncatable_primes references Primes. In the html source there is a "wgCategories=[" inside a script and I can see at the bottom where a "Category:Primes (page does not exist)" is generated but I can't find where to fix this. Help? --Dgamey 10:29, 18 May 2011 (UTC)

Perhaps in the Clojure entry? --Rdm 11:11, 18 May 2011 (UTC)
Ah ha. Not Clojure, Haskell references a library called Primes. That has to be the wrong way to do it! It would create dozens of phantom categories all over RC. It has to be a primes member or package in some Haskell library. Is there a haskell user that can fix this out there? --Dgamey 11:26, 18 May 2011 (UTC)
If that's the real name for the library then that is the right way to do it. It may need to change to something like {{libheader|Primes (Haskell)}}. --Mwn3d 12:22, 18 May 2011 (UTC)

redefinition of truncatable primes

I think this task's definition of truncatable primes needs to be redefined to include the phrase base ten. It could be something like:

A truncatable prime (expressed in base ten) is a prime that when successive digits are removed from one end of the prime, all numbers thus found are prime.


or some such wording.
As an alternative, could MathWorld™'s definition be used? -- Gerard Schildberger 16:17, 12 September 2012 (UTC)

Hi Gerard, there is nothing in the task description implying a base at all and so usually we mean base ten. People talk about "the prime numbers" meaning the prime numbers in base ten without having to explicitly mention it and without confusion. You're not incorrect, (sorry about the double negative); but is it necessary. --Paddy3118 18:38, 12 September 2012 (UTC)