All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Numbers
Clever counting (Posted on 2015-08-07) Difficulty: 3 of 5
Some positive integers n have the property that the sum
[ n + reverse(n) ] consists entirely of odd (decimal) digits.
For instance, 36 + 63 = 99 and 409 + 904 = 1313.
We will call such numbers reversible; so 36, 63, 409, and 904 are reversible. Leading zeroes are not allowed in either n or reverse(n).
There are 120 reversible numbers below one-thousand.

a. Evaluate how many reversible numbers are there
below 10k, k=2,3... up to 6 or 7 .

b. Analyze the results, aiming to find the relation (i.e. approximate function) between N(k) and k.

Source: Project Euler, modified.

No Solution Yet Submitted by Ady TZIDON    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
re: Part b researched solution Comment 6 of 6 |
(In reply to Part b researched solution by Charlie)

Note that even in the verbal description of the algorithm, the mathblogger makes a mistake:

3 and 7 have the same kind of argumentation, and I have carried it out on 11 as well just to check. So for a number n = 4k + 3 for some integer k we have that the middle digit and the outer pair gives us 5 and 20 options.

Then we have sets of internal pairs which gives us 20 and 25 solutions. So that means we can generalize it to 20*5*(20*25)^(k-1) = 100*500^(k-1)

But for n=3, k=0. The mathblogger's formula gives 100*500^(-1) = .2, obviously not the number of satisfactory 3-digit n's, which he himself lists as 100 earlier on his page. The formula is correct for n = 4k - 1, the same set of cases but with k assigned differently. With this assignment, 100*500^(k-1) comes out to 100*500^0 = 100, the correct value.  My modified program takes this into consideration to get answers that match reality.

Edited on August 8, 2015, 8:21 am
  Posted by Charlie on 2015-08-08 08:20:18

Please log in:
Remember me:
Sign up! | Forgot password

Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (2)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Copyright © 2002 - 2018 by Animus Pactum Consulting. All rights reserved. Privacy Information