Talk:Palindromic gapful numbers

From Rosetta Code

Please clarify[edit]

I don't understand the second and third part of the requirements. What does this mean?

  • Show (nine sets, like above) of palindromic gapful numbers:
  • the last 15 palindromic gapful numbers (out of 100)
  • the last 10 palindromic gapful numbers (out of 1,000) {optional}

Thanks. --Paddy3118 (talk) 19:54, 12 November 2019 (UTC)

Is it:
The last fifteen of the first 100 binned-by-last digit gapful numbers >= 100
--Paddy3118 (talk) 19:59, 12 November 2019 (UTC)
Yes, that's my understanding and it must be correct as it's what Gerard's REXX entry does and he's the author of the task. --PureFox (talk) 20:38, 12 November 2019 (UTC)

Starting at   100   (which is the minimum that gapful numbers start at, as per the note on the task page that all positive integers below   100   are trivially gapful numbers),   then ...

  •   generate     100   palindromic gapful numbers,   and then take (pick) the last   15   of those     100   numbers.
  •   generate   1000   palindromic gapful numbers,   and then take (pick) the last   10   of those   1000   numbers.

There is probably a better and cleaner   (or more concise)   way of expressing the above (two) sentences,   but the (bottom/lower) limit of   100   kinda throws a monkey wrench into the works, er ...   wording of the expression.

Another way of expressing the above would be:

  •   generate the     86th ──►   100th palindromic gapful numbers, ignoring those below   100.
  •   generate the   991st ──► 1000th palindromic gapful numbers, ignoring those below   100.

I had assumed that programmers would take/pick those (above) palindromic gapful numbers in increasing order,   and it seemed unnecessary to state that.

I must admit, I never heard of that phrase     binned by last,     but once reading it, I knew what it meant.

I hope the parenthetic phrase           (nine sets)           was clear enough;   If it wasn't for the output, I don't know how I would've expressed it.   I assumed the output from the REXX example would make that clear enough.   I had toyed with expanding that parenthesized expression, but it just got too overly wordy and inelegant, and even somewhat ugly.     -- Gerard Schildberger (talk) 00:12, 13 November 2019 (UTC)

Hi Gerard, as you saw above, I did eventually work it out.
Having looked again at my wording I think it might be better with an extra hyphen tieing in the word "digit"?
The last fifteen of the first 100 binned-by-last-digit gapful numbers >= 100
--Paddy3118 (talk) 20:16, 13 November 2019 (UTC)
P.S. I enjoyed the task.


(Referencing Paddy3118's comment above.)

I thought it was a pretty simple task, nothing much complicated, but enough computation so that it required just a hint of heavy lifting (at least, for the solution I entered).   I thought I hit on a clever method to limit the calculation (to ten) entries per ending decimal digit without computing extra entries or excessive limit checking.

It was interesting to note some of the optimizations for this task,   ... which to do first ...   create palindromes and then filter the gapful numbers,   or vice-versa.     -- Gerard Schildberger (talk) 20:52, 13 November 2019 (UTC)