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

Home > Numbers
Flipflop the digits, octuple the number (Posted on 2022-03-30) Difficulty: 3 of 5
Define the flipflop function, applied to a positive integer, as the result of having the 10^2i and 10^(2i+1) digits switch places.
Moreover, if the integer has an odd number of digits, append a leading zero to the left side of the number so that it can flipflop with the first nonzero digit.

For example, flipflop(9876) = 8967 and flipflop(1234567) is 10325476.

warm-up:
What is the smallest positive integer such that flipflop(m) = m*4?

octuple the number:
What is the smallest positive integer such that flipflop(n) = n*8?
In the case of multiplication by 8, I have found only one solution: are there any others?

No Solution Yet Submitted by Larry    
Rating: 5.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
re: computer solution | Comment 2 of 5 |
(In reply to computer solution by Charlie)

Is it safe to say that your algorithm spends most of the time doing the flipflop?  If we can weed out candidates before applying the flipflop that should speed things up.


Some elementary analysis:
Let f(x) denote the flipflop operation on natural number x.

For any natural number x, x and f(x) will be congruent mod 9, or equivalently f(x) - x = 0 mod 9.
In the warm-up problem f(m)=4m, which makes 4m - m = 0 mod 9, which reduces to m = 0 mod 3; m must be multiple of 3 to be a solution.
In the octuple problem f(n)=8n, which makes 8n - n = 0 mod 9, which reduces to n = 0 mod 9; n must be multiple of 9 to be a solution.

For any natural number x, x and f(x) will have opposing parity mod 11, or equivalently f(x) + x = 0 mod 11.
In the warm-up problem f(m)=4m, which makes 4m + m = 0 mod 11, which reduces to m = 0 mod 11; m must be multiple of 11 to be a solution.
In the octuple problem f(n)=8n, which makes 8n + n = 0 mod 11, which reduces to n = 0 mod 11; n must be multiple of 11 to be a solution.

So then by combining congruences we have that in the warm-up problem m must be a multiple of 33 and and in the octuple problem n must be a multiple of 99.
I would expect this to help speed up a computer search.

  Posted by Brian Smith on 2022-03-30 12:05:08
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


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

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information