Talk:Lychrel numbers: Difference between revisions

m
 
(15 intermediate revisions by 5 users not shown)
Line 17:
 
==J answer==
I do like the kind of exploratory fellfeel given to the J example - I am new to it too and was using Python in a similar fashion :-)
 
Would just ask that the count of relateds (as opposed to relateds + true Lychrel candidates) be given.<br>
--[[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 18:51, 29 August 2015 (UTC)
 
:Thanks for the update/fix. --[[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 22:19, 29 August 2015 (UTC)
 
: I have added that. But note that the task description currently asks for us to "Find the number of Lychrel and related numbers for a starting n in the ...". And there might be two different ways to parse this sentence:
 
:: "Find the number of (Lychrel and related numbers) ...", or
 
:: "Find the number of Lychrel numbers and find the number of related numbers ...".
 
: I understood the sentence to mean the former, but it sounds like you had intended the latter? --[[User:Rdm|Rdm]] ([[User talk:Rdm|talk]]) 22:21, 29 August 2015 (UTC)
 
::: Thanks Rdm. I have made an update to the task description. Shout if it is still confusing. --[[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 06:34, 30 August 2015 (UTC)
 
:::: It actually is still slightly odd. The first step asks us to find the number of true lychrel numbers, and the second step asks us to print both the number of true lychrel numbers and the numbers themselves. Why not just ask to find the numbers themselves and then print the numbers (and how many of them)? --[[User:Rdm|Rdm]] ([[User talk:Rdm|talk]]) 12:31, 30 August 2015 (UTC)
 
::::: Agreed with Rdm - displaying the count for such a short list seems redundant. Splitting the second Task bullet in two might also make it scan better:
:::::* Find the number of true Lychrel number candidates and related numbers for a starting n in the range 1..10000 inclusive. (With that iteration limit of 500).
:::::* Print all of the true Lychrel numbers found
:::::* Print the ''number'' of related numbers found
:::::* Print any Lychrel or related number that is itself a palindrome
::::: --[[User:Aspectcl|Aspectcl]] ([[User talk:Aspectcl|talk]]) 13:21, 31 August 2015 (UTC)
 
==Related numbers could be clearer in the description==
 
I found the definition of Related numbers a bit tricky to parse (and fielded a question on irc from another user who was confused). Perhaps explicitly referring to OEIS sequence A088753 ("seed" Lychrel numbers) as well as A023108 (seed and related Lychrel numbers) would make this a little clearer?
Alternatively, by way of illustration: 196 is Lychrel, with its sequence beginning 196+691=887... 295 is Related because 295+592=887, and 887 already belongs to 196's sequence. --[[User:Aspectcl|Aspectcl]] ([[User talk:Aspectcl|talk]]) 13:21, 31 August 2015 (UTC)
: Re-worded using your suggested seed/related idea.--[[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 15:02, 31 August 2015 (UTC)
:: That reads much more clearly to me, and the example is better than mine for taking two steps. --[[User:Aspectcl|Aspectcl]] ([[User talk:Aspectcl|talk]]) 23:37, 31 August 2015 (UTC)
 
==simpler wording==
 
:: For: &nbsp; &nbsp; ''1. &nbsp; Take an integer n, greater than zero.''
 
:: Use: &nbsp; &nbsp; ''1. &nbsp; Take a positive integer n.''
 
-- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 16:30, 31 August 2015 (UTC)
 
:Isn't it the case that while the latter may be technically correct and less wordy, the former states more explicitly the omission of zero? I tend to want to keep the former. --[[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 17:59, 31 August 2015 (UTC)
 
::: Zero is not positive. &nbsp; Both are technically correct, I didn't imply that one was incorrect, I just stated an opinion that one sentence is more simpler (and cleaner). &nbsp; -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 22:16, 31 August 2015 (UTC)
 
:: Why is this even an issue? Regardless of whether or not 0 is tested, 0 is not a Lychrel number because 0+0 = 0 and 0 is a palindrome. --[[User:Rdm|Rdm]] ([[User talk:Rdm|talk]]) 18:01, 31 August 2015 (UTC)
 
== How can a Related number be a palindrome? ==
 
We're asked to list "Seeds or related numbers" that are palindromes.
How is it possible that a related number is palindromic?
Surely that would stop its seed from being a Lycrel number?
Could someone provide an e.g. and explanation (or rewrite the task objetive)?
--[[User:Tim-brown|Tim-brown]] ([[User talk:Tim-brown|talk]]) 07:59, 11 September 2015 (UTC)
 
: |Hi Tim, there is a version of the algorithm that does not produce palindromes, but the key is in this:
:: ''Notice that the check for a palindrome happens after an addition.''
: That example starts with the palindromic number 55 but the check comes later.
: --[[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 21:03, 11 September 2015 (UTC)
 
: 4994 is an example of a related number which is a palindrome. There are other examples. And like Paddy said, we only reject the seed if a sum was a decimal palindrome. --[[User:Rdm|Rdm]] ([[User talk:Rdm|talk]]) 13:18, 12 September 2015 (UTC)
6,951

edits