11
$\begingroup$

To allow new users to solve this puzzle and earn reputation points, I encourage all users whose reputation is 200 or more to not post an answer until 48 hours after this question is posted. Thank you!


A puzzle by Paul Vaderlind:

Is it possible to arrange 25 whole numbers (not necessarily all different) so that the sum of any three successive terms is even but the sum of all 25 is odd?

I found this puzzle on the Futility Closet website.

$\endgroup$
5
  • 2
    $\begingroup$ Paul is of Swedish nationality. $\endgroup$ Commented Jul 1 at 8:09
  • $\begingroup$ Where exactly is this from? Is it from one of his books? If it is from a url then pls mention the url. Asking because I really liked this puzzle and am hoping that there would be more good ones at the place this came from. $\endgroup$ Commented Jul 2 at 13:39
  • $\begingroup$ @HemantAgarwal I have edited my post to include the website that hosted this puzzle. $\endgroup$ Commented Jul 2 at 17:19
  • 1
    $\begingroup$ Futility closet is wow. Thank you for introducing it to me. $\endgroup$ Commented Jul 3 at 18:34
  • $\begingroup$ @HemantAgarwal You’re welcome. $\endgroup$ Commented Jul 3 at 18:42

9 Answers 9

2
$\begingroup$

The puzzle has been solved already, but one concrete example involves the Fibonacci numbers, usually defined to begin with

1, 1, 2, 3, 5, 8,...

with of course each term after the second being the sum of the previous two. Exactly every third Fibonacci number is even, so any sum of three consecutive Fibonacci numbers is the sum of two odds and one even.

The sum of the first $N$ Fibonacci numbers is equal to the $(N+2)$-th number minus 1, and the 27th Fibonacci number, with 27 a multiple of 3, happens to be even. Hence the sum of the first 25 Fibonacci numbers is (even minus 1 = odd). The actual value of this sum is 196,417.

$\endgroup$
1
  • 1
    $\begingroup$ +1 What a cool answer! And thanks for honouring the 48 hour constraint. $\endgroup$ Commented Jul 2 at 17:43
21
$\begingroup$

There are only two possible solutions (disregarding meaningless number swaps).

110 110 110 110 110 110 110 110 1 or 101 101 ... 101 1

Explanation

We are just using 1s and zeros for simplicity. The first two numbers determine the entire rest of the sequence and it's always going to be periodic with 3. Each period has two 1s and one 0. That makes the possible starters 110, 101, or 011. You can pick the parity of the entire sequence by choosing the proper starting sequence. Since sum from 1-24 must is even, the 25th value must be a one, so the only possible starters are 110 and 101. These are the only two possible solutions (Disregarding swapping 1s and 0s for any other odd or even number).

What I mean by "meaningless number swaps"

For this puzzles it only matters if each individual number is even or odd. Nothing changes at all, if you swap any odd number with any other odd number or if you swap any even number with any other even number. That means you create a new sequence by simply swapping any 1 with with ...-7,-5,-3,-1,3,5,7,... Same for swapping 0 with an even number.

$\endgroup$
1
  • 7
    $\begingroup$ +1. A little input, instead of "disregarding meaningless number swaps", the term usually used in this case is "without loss of generalization, we can consider only the parities of the numbers. ..." $\endgroup$
    – justhalf
    Commented Jul 1 at 14:31
13
$\begingroup$

1 1 2 1 1 2

In this group, the sum of any 3 successive terms is even and the total is even.

Repeat this 4 times, you get 24 numbers. Still, the sum of any 3 successive terms is even and the total is even.

Add a 1 on the end. The sum of the last 3 numbers is still even. As the sum of the 24 first numbers is even, the total of all numbers is odd.

This is just one of numerous possibilities.

$\endgroup$
1
  • 1
    $\begingroup$ Please hide this answer until the 48 hours are up. $\endgroup$ Commented Jul 1 at 0:12
5
$\begingroup$

1,2,3,1,2,3 ,1,2,3 ,1,2,3 ,1,2,3 ,1,2,3 ,1,2,3 ,1,2,3,1

$\endgroup$
1
  • $\begingroup$ Welcome to PSE (Puzzling Stack Exchange)! $\endgroup$ Commented Jul 1 at 18:55
5
$\begingroup$

1011011011011011011011011 and 1101101101101101101101101.

Explanation and method of solution.

Without loss of generality, the only numbers in the sequence are 0 and 1 (you can add any even number to any element of a solution to get another equivalent solution). The requirement for the sum of each three consecutive numbers to be even means that the entire sequence is determined by the first two elements since the third element is fixed by the first two element, and then the fourth by the second and third and so on. That means, just considering the 3-sums being even requirement there are 4 possible solutions (grouping them in threes to make them easier to read):

000 000 000 000 000 000 000 000 0
011 011 011 011 011 011 011 011 0
101 101 101 101 101 101 101 101 1
110 110 110 110 110 110 110 110 1

The last two have odd sum.

$\endgroup$
3
  • 1
    $\begingroup$ Formatting: it would probably make more sense to use groups of 3 digits rather than 5, and so put each one on a separate line for alignment. $\endgroup$
    – jcaron
    Commented Jul 1 at 15:26
  • 1
    $\begingroup$ Note: you can add a newline either with <br> or with two spaces at the end of a line. $\endgroup$
    – jcaron
    Commented Jul 1 at 15:57
  • 1
    $\begingroup$ Welcome to PSE (Puzzling Stack Exchange)! $\endgroup$ Commented Jul 1 at 18:54
4
$\begingroup$

110 110 110 110 110 110 110 110 1
101 101 101 101 101 101 101 101 1

Explanation

The sum of N whole numbers being odd or even only depends on each of the numbers being odd or even. So we use 0 and 1, but:

  • any 0 can be replaced with any even number
  • any 1 can be replace with any odd number.

    Since we need any 3 successive numbers to be even, we need a repeating pattern of 3 numbers.
    The possible values of a 3 digit-pattern using only 0 and 1 are:
    000 even
    001 odd
    010 odd
    011 even
    100 odd
    101 even
    110 even
    111 odd

    That leaves us with 000, 011, 101 and 110:
    000 000 -> the sum of any 3 consecutive digits (always 000) is even.
    011 011 -> the 3 consecutive digits can be either 011, 110 or 101, all 3 sums are even.
    101 101 -> it's the same 3 groups just offset by 1
    110 110 -> ditto

    Another way of getting this list is considering that to get an even sum of 3 digits, we need either:
  • Only even digits (0 -> 000)
  • Two odd digits (1, the sum of which will be even) and one even digit (0) -> 011, 101 or 110.

    Now, by repeating 8 times either of these 4 patterns, we get a series of 24 numbers where the sum of any 3 consecutive numbers is even. Clearly the sum of all 24 numbers is even as well.

    We still need to add one digit, and for the sum of all numbers to be odd. This condition means the last digit must be 1.
    Since we need to continue repeating our pattern, it means the pattern must start with 1, which only leaves us 101 and 110.

  • $\endgroup$
    1
    • $\begingroup$ Welcome to PSE (Puzzling Stack Exchange)! $\endgroup$ Commented Jul 1 at 18:55
    2
    $\begingroup$

    Working:

    Use only the numbers 0 and 1. Any multiple of 2 added to any number has no effect on the even-ness or odd-ness in any of the sums it is involved in.

    If you specify the first two numbers in a 0-1 sequence, the sum of the first three numbers uniquely determines the next member, and so on.

    If you start with 0,0 the rest of the members are 0, so the overall sum cannot be odd.

    If you start with 1,1.. it will continue ..0 1,1,0,1,1. It has a repeating element of 1,1,0. The sum of this is element is even. The series will have eight repeats of this element, so the last number must be 1 for the overall sum to be odd.

    There are two solutions composed of 0 and 1 as a 25 number sequence from a repeating copy of 1,1,0 ending in 1.

    Solution:

    1,0,1,1,0,1,1,0,1,1,0,1,1,0,1,1,0,1,1,0,1,1,0,1,1 or 1,1,0,1,1,0,1,1,0,1,1,0,1,1,0,1,1,0,1,1,0,1,1,0,1

    $\endgroup$
    4
    • $\begingroup$ Your solution has a sum of 16, which does not meet the required condition of an overall odd sum. $\endgroup$ Commented Jul 2 at 16:11
    • $\begingroup$ @DanielMathias I have changed my working to give solutions for a total odd sum. Has this question been edited? The one that I answered (rightly or wrongly) had a single solution, so it was a better problem. PS: it has not been edited. $\endgroup$ Commented Jul 2 at 16:27
    • $\begingroup$ The reverse of any valid sequence is also a valid sequence. The two binary solutions are equivalent. $\endgroup$ Commented Jul 2 at 16:45
    • $\begingroup$ @RichardKirk Welcome to PSE (Puzzling Stack Exchange)! $\endgroup$ Commented Jul 2 at 17:31
    1
    $\begingroup$

    Let us say that such a sequence exists. Let us label the numbers as a1, a2, a3…a25

    If such a sequence exists then a25 has to be odd. This is because:

    a1+a2+a3 is even

    a4+a5+a6 is even

    a7+a8+a9 is even

    a22+a23+a24 is even..

    Thus, a1+a2…a24 is even. So, a25 will have to be odd. By the same logic, a1 is odd as well.

    Now, for a1+a2+a3 to be even, one of a2 and a3 has to be odd and the other has to be even.

    Case 1 a2 is odd and a3 is even.

    The sequence then becomes odd odd even odd odd even odd odd even odd odd even… odd odd even odd

    Case 1 works.

    Case 2 a2 is even and a3 is odd.

    The sequence then becomes odd even odd odd even odd odd even odd >odd…….even odd odd.

    Case 2 also works.

    Therefore, any sequence that is of either of the 2 forms above, will satisfy all the conditions.

    $\endgroup$
    -1
    $\begingroup$

    1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1 is one solution. The sum of any three consecutive terms is always 2, and the sum of the series is 17. The zeroes and ones can represent any even or odd numbers respectively, and so there are infinitely many solutions to the problem.

    $\endgroup$
    2
    • 4
      $\begingroup$ This answer has already been given hours ago, please see the highest voted answer. Please do not duplicate answers unless you have something substantial to add $\endgroup$
      – bobble
      Commented Jul 2 at 13:41
    • $\begingroup$ Welcome to PSE (Puzzling Stack Exchange)! $\endgroup$ Commented Jul 2 at 17:00

    Your Answer

    By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

    Not the answer you're looking for? Browse other questions tagged or ask your own question.