Date: 28/06/2022 11:59:17
From: The Rev Dodgson
ID: 1901825
Subject: New Scientist puzzle
New Scientist has a weekly puzzle which is often easy, but sometimes it takes me all week to solve.
Last week’s was in the latter category:
There are two 4 digit numerical codes, A and B.
B is 4 times A
A is B reversed
What are A and B
I managed to reason out the first and last digits, but I ended up going to Excel to work out the other two.
Date: 28/06/2022 12:09:07
From: dv
ID: 1901827
Subject: re: New Scientist puzzle
The Rev Dodgson said:
New Scientist has a weekly puzzle which is often easy, but sometimes it takes me all week to solve.
Last week’s was in the latter category:
There are two 4 digit numerical codes, A and B.
B is 4 times A
A is B reversed
What are A and B
I managed to reason out the first and last digits, but I ended up going to Excel to work out the other two.
Well ottomh one solution is 0000
Date: 28/06/2022 12:11:09
From: The Rev Dodgson
ID: 1901829
Subject: re: New Scientist puzzle
dv said:
The Rev Dodgson said:
New Scientist has a weekly puzzle which is often easy, but sometimes it takes me all week to solve.
Last week’s was in the latter category:
There are two 4 digit numerical codes, A and B.
B is 4 times A
A is B reversed
What are A and B
I managed to reason out the first and last digits, but I ended up going to Excel to work out the other two.
Well ottomh one solution is 0000
Yeah, but that wasn’t allowed (they revealed this week). The codes are 4 different digits.
Date: 28/06/2022 12:11:56
From: esselte
ID: 1901831
Subject: re: New Scientist puzzle
The Rev Dodgson said:
New Scientist has a weekly puzzle which is often easy, but sometimes it takes me all week to solve.
Last week’s was in the latter category:
There are two 4 digit numerical codes, A and B.
B is 4 times A
A is B reversed
What are A and B
I managed to reason out the first and last digits, but I ended up going to Excel to work out the other two.
What does it mean that numerical code B is “4 times” numerical code A?
Date: 28/06/2022 12:12:20
From: SCIENCE
ID: 1901833
Subject: re: New Scientist puzzle
The Rev Dodgson said:
I managed to reason out the first and last digits, but I ended up going to Excel to work out the other two.
is it meant to be casually solvable or is the whole point to get people to knuckle down and nut it out
Date: 28/06/2022 12:13:52
From: The Rev Dodgson
ID: 1901835
Subject: re: New Scientist puzzle
esselte said:
The Rev Dodgson said:
New Scientist has a weekly puzzle which is often easy, but sometimes it takes me all week to solve.
Last week’s was in the latter category:
There are two 4 digit numerical codes, A and B.
B is 4 times A
A is B reversed
What are A and B
I managed to reason out the first and last digits, but I ended up going to Excel to work out the other two.
What does it mean that numerical code B is “4 times” numerical code A?
B= 4xA
Date: 28/06/2022 12:14:12
From: dv
ID: 1901836
Subject: re: New Scientist puzzle
The Rev Dodgson said:
dv said:
The Rev Dodgson said:
New Scientist has a weekly puzzle which is often easy, but sometimes it takes me all week to solve.
Last week’s was in the latter category:
There are two 4 digit numerical codes, A and B.
B is 4 times A
A is B reversed
What are A and B
I managed to reason out the first and last digits, but I ended up going to Excel to work out the other two.
Well ottomh one solution is 0000
Yeah, but that wasn’t allowed (they revealed this week). The codes are 4 different digits.
Well shit, that’s a pretty important condition to omit…
So all four digits have to be different?
Date: 28/06/2022 12:16:26
From: The Rev Dodgson
ID: 1901840
Subject: re: New Scientist puzzle
SCIENCE said:
The Rev Dodgson said:
I managed to reason out the first and last digits, but I ended up going to Excel to work out the other two.
is it meant to be casually solvable or is the whole point to get people to knuckle down and nut it out
The first and last digits are fairly easily found from basic arithmetic, but I didn’t find an easy way to find the other two.
There may be one though.
Date: 28/06/2022 12:17:47
From: ChrispenEvan
ID: 1901842
Subject: re: New Scientist puzzle
The Rev Dodgson said:
SCIENCE said:
The Rev Dodgson said:
I managed to reason out the first and last digits, but I ended up going to Excel to work out the other two.
is it meant to be casually solvable or is the whole point to get people to knuckle down and nut it out
The first and last digits are fairly easily found from basic arithmetic, but I didn’t find an easy way to find the other two.
There may be one though.
I find google is one of the easiest ways.
Date: 28/06/2022 12:18:14
From: The Rev Dodgson
ID: 1901843
Subject: re: New Scientist puzzle
dv said:
The Rev Dodgson said:
dv said:
Well ottomh one solution is 0000
Yeah, but that wasn’t allowed (they revealed this week). The codes are 4 different digits.
Well shit, that’s a pretty important condition to omit…
So all four digits have to be different?
That isn’t a requirement, but the only answer other than 0000 has four different digits.
Date: 28/06/2022 12:19:59
From: esselte
ID: 1901846
Subject: re: New Scientist puzzle
The Rev Dodgson said:
esselte said:
The Rev Dodgson said:
New Scientist has a weekly puzzle which is often easy, but sometimes it takes me all week to solve.
Last week’s was in the latter category:
There are two 4 digit numerical codes, A and B.
B is 4 times A
A is B reversed
What are A and B
I managed to reason out the first and last digits, but I ended up going to Excel to work out the other two.
What does it mean that numerical code B is “4 times” numerical code A?
B= 4xA
OK, but what is a “numerical code”? How would the question be different if it talked about “4 digit numbers” rather than “4 digit numerical codes”?
Like, my PIN on my bankcard is a numerical code. 9876. Four times the number would be 39,504. Four times the numerical code would be what? 9876987698769876?
Date: 28/06/2022 12:20:10
From: The Rev Dodgson
ID: 1901847
Subject: re: New Scientist puzzle
ChrispenEvan said:
The Rev Dodgson said:
SCIENCE said:
is it meant to be casually solvable or is the whole point to get people to knuckle down and nut it out
The first and last digits are fairly easily found from basic arithmetic, but I didn’t find an easy way to find the other two.
There may be one though.
I find google is one of the easiest ways.
But that’s even more cheating than using Excel.
Date: 28/06/2022 12:21:48
From: ChrispenEvan
ID: 1901848
Subject: re: New Scientist puzzle
esselte said:
The Rev Dodgson said:
esselte said:
What does it mean that numerical code B is “4 times” numerical code A?
B= 4xA
OK, but what is a “numerical code”? How would the question be different if it talked about “4 digit numbers” rather than “4 digit numerical codes”?
Like, my PIN on my bankcard is a numerical code. 9876. Four times the number would be 39,504. Four times the numerical code would be what? 9876987698769876?
I’m glad someone is being pedantic on this “teaser”.
:-)
Date: 28/06/2022 12:21:59
From: btm
ID: 1901849
Subject: re: New Scientist puzzle
The Rev Dodgson said:
New Scientist has a weekly puzzle which is often easy, but sometimes it takes me all week to solve.
Last week’s was in the latter category:
There are two 4 digit numerical codes, A and B.
B is 4 times A
A is B reversed
What are A and B
I managed to reason out the first and last digits, but I ended up going to Excel to work out the other two.
That’s a trivial puzzle/solution.
ABCD
× 4
———-
DCBA
Try the same with 5 digits.
Date: 28/06/2022 12:22:52
From: The Rev Dodgson
ID: 1901851
Subject: re: New Scientist puzzle
esselte said:
The Rev Dodgson said:
esselte said:
What does it mean that numerical code B is “4 times” numerical code A?
B= 4xA
OK, but what is a “numerical code”? How would the question be different if it talked about “4 digit numbers” rather than “4 digit numerical codes”?
Like, my PIN on my bankcard is a numerical code. 9876. Four times the number would be 39,504. Four times the numerical code would be what? 9876987698769876?
They are both 4 digit numbers, and the lower number multiplied by four gives you the higher number.
Date: 28/06/2022 12:24:14
From: The Rev Dodgson
ID: 1901853
Subject: re: New Scientist puzzle
btm said:
The Rev Dodgson said:
New Scientist has a weekly puzzle which is often easy, but sometimes it takes me all week to solve.
Last week’s was in the latter category:
There are two 4 digit numerical codes, A and B.
B is 4 times A
A is B reversed
What are A and B
I managed to reason out the first and last digits, but I ended up going to Excel to work out the other two.
That’s a trivial puzzle/solution.
ABCD
× 4
———-
DCBA
Try the same with 5 digits.
So what are the numbers and why is ity trivial?
Date: 28/06/2022 12:35:29
From: btm
ID: 1901857
Subject: re: New Scientist puzzle
The Rev Dodgson said:
btm said:
The Rev Dodgson said:
New Scientist has a weekly puzzle which is often easy, but sometimes it takes me all week to solve.
Last week’s was in the latter category:
There are two 4 digit numerical codes, A and B.
B is 4 times A
A is B reversed
What are A and B
I managed to reason out the first and last digits, but I ended up going to Excel to work out the other two.
That’s a trivial puzzle/solution.
ABCD
× 4
———-
DCBA
Try the same with 5 digits.
So what are the numbers and why is ity trivial?
Clearly A is even (since 4×D must be even); D is less than 10, since 4×A + carry from the previous column must be less than 10, so A can only be 1 or 2. Since A’s even, it must be 2. and D must be either 3 or 8; D can’t be 3 (since 4×A+carry is less than 10) so it must be 8. This means that 3 is carried over for the C column, and 4×C+3 ≡ B (mod 10)
I’ll leave the rest as an exercise for the reader, but it really is trivial. Extending the problem to 5 digits is a little more interesting; it’s possible to extend it arbitrarily, too, and that’s worth trying because it’s even more interesting.
Date: 28/06/2022 12:41:51
From: The Rev Dodgson
ID: 1901859
Subject: re: New Scientist puzzle
btm said:
The Rev Dodgson said:
btm said:
That’s a trivial puzzle/solution.
ABCD
× 4
———-
DCBA
Try the same with 5 digits.
So what are the numbers and why is ity trivial?
Clearly A is even (since 4×D must be even); D is less than 10, since 4×A + carry from the previous column must be less than 10, so A can only be 1 or 2. Since A’s even, it must be 2. and D must be either 3 or 8; D can’t be 3 (since 4×A+carry is less than 10) so it must be 8. This means that 3 is carried over for the C column, and 4×C+3 ≡ B (mod 10)
I’ll leave the rest as an exercise for the reader, but it really is trivial. Extending the problem to 5 digits is a little more interesting; it’s possible to extend it arbitrarily, too, and that’s worth trying because it’s even more interesting.
OK, I got the first and last numbers with the sam ereasoning as above. The relationship btween th emiddle 2 wasn’t so obvious to me (although I suppose it should have been, now I know what it was).
Date: 28/06/2022 12:46:28
From: btm
ID: 1901862
Subject: re: New Scientist puzzle
The Rev Dodgson said:
btm said:
The Rev Dodgson said:
So what are the numbers and why is ity trivial?
Clearly A is even (since 4×D must be even); D is less than 10, since 4×A + carry from the previous column must be less than 10, so A can only be 1 or 2. Since A’s even, it must be 2. and D must be either 3 or 8; D can’t be 3 (since 4×A+carry is less than 10) so it must be 8. This means that 3 is carried over for the C column, and 4×C+3 ≡ B (mod 10)
I’ll leave the rest as an exercise for the reader, but it really is trivial. Extending the problem to 5 digits is a little more interesting; it’s possible to extend it arbitrarily, too, and that’s worth trying because it’s even more interesting.
OK, I got the first and last numbers with the sam ereasoning as above. The relationship btween th emiddle 2 wasn’t so obvious to me (although I suppose it should have been, now I know what it was).
OK, you know that 4×A=8 (leftmost column), so there’s no carry from the previous column. That means that B must be 1 or 2, so you know B. Since you also know the carry from 4×A (rightmost column), finding C is, as I’ve noted several times, trivial.
Really, try it with 5 (or more) digits.
Date: 28/06/2022 12:53:36
From: The Rev Dodgson
ID: 1901865
Subject: re: New Scientist puzzle
btm said:
The Rev Dodgson said:
btm said:
Clearly A is even (since 4×D must be even); D is less than 10, since 4×A + carry from the previous column must be less than 10, so A can only be 1 or 2. Since A’s even, it must be 2. and D must be either 3 or 8; D can’t be 3 (since 4×A+carry is less than 10) so it must be 8. This means that 3 is carried over for the C column, and 4×C+3 ≡ B (mod 10)
I’ll leave the rest as an exercise for the reader, but it really is trivial. Extending the problem to 5 digits is a little more interesting; it’s possible to extend it arbitrarily, too, and that’s worth trying because it’s even more interesting.
OK, I got the first and last numbers with the sam ereasoning as above. The relationship btween th emiddle 2 wasn’t so obvious to me (although I suppose it should have been, now I know what it was).
OK, you know that 4×A=8 (leftmost column), so there’s no carry from the previous column. That means that B must be 1 or 2, so you know B. Since you also know the carry from 4×A (rightmost column), finding C is, as I’ve noted several times, trivial.
Really, try it with 5 (or more) digits.
Wasted too much time already :)
Date: 28/06/2022 12:53:40
From: dv
ID: 1901866
Subject: re: New Scientist puzzle
Well I’d attack it in a semi organised way.
A wxyz
B zyxw
If B is 4A then we have the following pairings of z and w
0 0
1 4
2 8
3 2
4 6
5 0
6 4
7 8
8 2
9 6
Clearly A can’t be higher than 2499 so w is 0 or 2.
0___ times 4 can’t start with 5, and 2__ times 4 can’t start with 3, so we down to 0__0 or 2__8.
0__0 basically becomes a 2 digit problem and I can make the same considerations for xy as I did for wz and I can see in this list no suitable 2 digit numbers so we’re done with 0__0.
Now if A*4 starts with 8 and A starts with 2 then A can’t be higher than 2248. We could just test those 24 values but I guess rev wants something more systematic. (It probably won’t be quicker than checking those 24 values but anyway…)
And then we can just use the two conditions to narrow down on a range.
If x 0 then 2008 to 2098 step 10 is the range. But 4 times the top of this range is less than 8400 so y is less than 4. Which in turn means the top is less than 8200, so y is less than 2. Which in turn means the top is less than 1, which only leaves y = 0 and I hope rev lets me eliminate 2008 “by inspection”.
If x 1 then 2108 to 2198 is the range. 4 times this gives a range of B from 8432 to 8792 so y is from 4 to 7. New x range is from 2148 to 2178. New B range is from 8592 to 8712. And we have a winner. 2178.
Date: 28/06/2022 14:27:29
From: dv
ID: 1901875
Subject: re: New Scientist puzzle
btm said:
Try the same with 5 digits.
Okay using the same logic as before, I can easily narrow it down to 2___8.
I’ll use terminology wxmyz so that yz are still the last two digits of A.
As before, xmy can be from 000 to 224, since A 225__ leads to B 9____.
The extra digit sure will slow things down.
But I can eliminate x 0 pretty much the same way as before If x 0, then B ends with 02 which can’t be a multiple of 4 so x can’t be 0.
Similarly if x 2 then B ends with 22 so we can eliminate x 2. And that only leaves x 1.
If x 1 then B ends with 12, which means A ends with 03, 28, 53, 78. But given A starts 21, we are looking for a B starting 84 to 87, so A ends 78.
Alright, so A 21_78, B 87_12.
(21078 + 100 m )*4 = 87012 + 100m
300 m = 87012 – 84312 = 2700
m = 9
So 21978
Date: 28/06/2022 14:48:26
From: SCIENCE
ID: 1901881
Subject: re: New Scientist puzzle
maybe y'all should just brutalise it in the general case with d1+10d2 +100d3+... = 4(...+100dn-2+10dn-1+dn and be done with this foolishness
Date: 28/06/2022 14:50:51
From: The Rev Dodgson
ID: 1901883
Subject: re: New Scientist puzzle
SCIENCE said:
maybe y'all should just brutalise it in the general case with d1+10d2 +100d3+... = 4(...+100dn-2+10dn-1+dn and be done with this foolishness
That’s what I did :)
Date: 28/06/2022 14:55:34
From: SCIENCE
ID: 1901884
Subject: re: New Scientist puzzle
The Rev Dodgson said:
SCIENCE said:
maybe y'all should just brutalise it in the general case with d1+10d2 +100d3+... = 4(...+100dn-2+10dn-1+dn and be done with this foolishness
That’s what I did :)
did you find a general solution
Date: 28/06/2022 14:56:47
From: Witty Rejoinder
ID: 1901887
Subject: re: New Scientist puzzle
SCIENCE said:
The Rev Dodgson said:
SCIENCE said:
maybe y'all should just brutalise it in the general case with d1+10d2 +100d3+... = 4(...+100dn-2+10dn-1+dn and be done with this foolishness
That’s what I did :)
did you find a general solution
My general solution is to consult btm.
Date: 28/06/2022 14:57:27
From: dv
ID: 1901889
Subject: re: New Scientist puzzle
SCIENCE said:
The Rev Dodgson said:
SCIENCE said:
maybe y'all should just brutalise it in the general case with d1+10d2 +100d3+... = 4(...+100dn-2+10dn-1+dn and be done with this foolishness
That’s what I did :)
did you find a general solution
Note that this will not have a single solution as an algebraic equation as this is a discrete maths problem…
Date: 28/06/2022 14:59:44
From: dv
ID: 1901892
Subject: re: New Scientist puzzle
I can tell you that 21(n 9s)78 is a solution when there are n+4 digits but I don’t have a proof that that is the only solution in such cases.
Date: 28/06/2022 15:03:17
From: btm
ID: 1901894
Subject: re: New Scientist puzzle
dv said:
I can tell you that 21(n 9s)78 is a solution when there are n+4 digits but I don’t have a proof that that is the only solution in such cases.
It is the only solution, and I can prove it. But not here.
Date: 28/06/2022 15:10:48
From: SCIENCE
ID: 1901898
Subject: re: New Scientist puzzle
dv said:
SCIENCE said:
The Rev Dodgson said:
That’s what I did :)
did you find a general solution
Note that this will not have a single solution as an algebraic equation as this is a discrete maths problem…
hence the brutality
Date: 28/06/2022 15:24:03
From: dv
ID: 1901900
Subject: re: New Scientist puzzle
btm said:
dv said:
I can tell you that 21(n 9s)78 is a solution when there are n+4 digits but I don’t have a proof that that is the only solution in such cases.
It is the only solution, and I can prove it. But not here.
I understand, hush hush
Date: 28/06/2022 15:37:57
From: The Rev Dodgson
ID: 1901907
Subject: re: New Scientist puzzle
SCIENCE said:
The Rev Dodgson said:
SCIENCE said:
maybe y'all should just brutalise it in the general case with d1+10d2 +100d3+... = 4(...+100dn-2+10dn-1+dn and be done with this foolishness
That’s what I did :)
did you find a general solution
Only for 3<n<5.< p=""></n<5.<>
Date: 28/06/2022 15:45:28
From: SCIENCE
ID: 1901909
Subject: re: New Scientist puzzle
dv said:
btm said:
dv said:
I can tell you that 21(n 9s)78 is a solution when there are n+4 digits but I don’t have a proof that that is the only solution in such cases.
It is the only solution, and I can prove it. But not here.
I understand, hush hush
this css margin is too narrow to contain it they said
Date: 28/06/2022 22:03:50
From: dv
ID: 1902058
Subject: re: New Scientist puzzle
btm said:
dv said:
I can tell you that 21(n 9s)78 is a solution when there are n+4 digits but I don’t have a proof that that is the only solution in such cases.
It is the only solution, and I can prove it. But not here.
Hmm I regret to inform you that you seem to be wrong.
For instance, 21782178 also has this property.
Date: 28/06/2022 22:11:44
From: btm
ID: 1902066
Subject: re: New Scientist puzzle
dv said:
btm said:
dv said:
I can tell you that 21(n 9s)78 is a solution when there are n+4 digits but I don’t have a proof that that is the only solution in such cases.
It is the only solution, and I can prove it. But not here.
Hmm I regret to inform you that you seem to be wrong.
For instance, 21782178 also has this property.
Damn. You’re right. Thank you. Now I’ll have to recheck my proof and find the mistake.
Date: 28/06/2022 22:21:51
From: dv
ID: 1902081
Subject: re: New Scientist puzzle
In terms of integer multiples, the four to seven digit cases all have the same pattern:
x 4 has a solution like 21(insert some nines here maybe)78
x 9 has a solution like 10(insert some nines here maybe)89
But the eight digit case has more solutions
x 4 is 21999978 or 21782178
x 9 is 10999989 or 10891089
Similarly for the nine digit case
x 4 is 219999978 or 217802178
x 9 is 109999989 or 108901089
—-
So is there any integer n, and integer k other than 4 or 9, such that there is a n-digit number A with a reverso B such that A * k = B?
And what about in hexadecimal?
Date: 28/06/2022 22:35:28
From: sibeen
ID: 1902100
Subject: re: New Scientist puzzle
btm said:
dv said:
btm said:
It is the only solution, and I can prove it. But not here.
Hmm I regret to inform you that you seem to be wrong.
For instance, 21782178 also has this property.
Damn. You’re right. Thank you. Now I’ll have to recheck my proof and find the mistake.
You should perhaps call it your ‘wrong’ :)
Date: 28/06/2022 23:27:39
From: dv
ID: 1902134
Subject: re: New Scientist puzzle
Given the aforedescribed paucity of An = B cases, for a laugh I took a look at some low integer fractions to see whether there were some interesting sets of An/m = B cases.
Looking at all improper fractions n/m with a numerator under 100, and all integers A up to 1000000, I made the following findings.
By far the most common case was 7/4 A = B, of which there were 128 cases. 31/13 did okay as well with 45.
Here are all the pairs that got at least 10 hits for integers under 1000000. If there’s a pattern there, I can’t see it.

There were 3 hits for 3/2: 4356. 43956, 439956.
Date: 28/06/2022 23:54:08
From: SCIENCE
ID: 1902137
Subject: re: New Scientist puzzle
dv said:
Here are all the pairs that got at least 10 hits for integers under 1000000. If there’s a pattern there, I can’t see it.

well yes there are a proliferation of PQ / QP pairs not saying it means anything profound
Date: 29/06/2022 08:09:36
From: The Rev Dodgson
ID: 1902176
Subject: re: New Scientist puzzle
dv said:
Given the aforedescribed paucity of An = B cases, for a laugh I took a look at some low integer fractions to see whether there were some interesting sets of An/m = B cases.
Looking at all improper fractions n/m with a numerator under 100, and all integers A up to 1000000, I made the following findings.
By far the most common case was 7/4 A = B, of which there were 128 cases. 31/13 did okay as well with 45.
Here are all the pairs that got at least 10 hits for integers under 1000000. If there’s a pattern there, I can’t see it.

There were 3 hits for 3/2: 4356. 43956, 439956.
Thanks to btm and dv for making this problem much more interesting than the original.
Date: 30/06/2022 01:28:43
From: dv
ID: 1902481
Subject: re: New Scientist puzzle
Rev or btm might like to have a crack at this.
A is a 12 digit binary number. B is the reverse, which is also a 12 digit number. These are conventionally expressed numbers, neither of them starts with a 0.
Without using brutality, find A such that A*5/3 = B
Date: 30/06/2022 01:49:38
From: sibeen
ID: 1902487
Subject: re: New Scientist puzzle
dv said:
Rev or btm might like to have a crack at this.
A is a 12 digit binary number. B is the reverse, which is also a 12 digit number. These are conventionally expressed numbers, neither of them starts with a 0.
Without using brutality, find A such that A*5/3 = B
Just because I may be interested, and to be sure that I’m understanding what you are saying; the absolute minimum the number could be is 4096. Is that correct?
Date: 30/06/2022 02:10:42
From: dv
ID: 1902491
Subject: re: New Scientist puzzle
sibeen said:
dv said:
Rev or btm might like to have a crack at this.
A is a 12 digit binary number. B is the reverse, which is also a 12 digit number. These are conventionally expressed numbers, neither of them starts with a 0.
Without using brutality, find A such that A*5/3 = B
Just because I may be interested, and to be sure that I’m understanding what you are saying; the absolute minimum the number could be is 4096. Is that correct?
Absolute minimum could be 2048. Maximum could be 4095. (Remembering that the 12th column is the “ones” column so the 1st column is the 2048s column.)