Even and odd numbers. The concept of decimal notation of a number. How to highlight even and odd numbers with different colors in Excel Formula to determine even or odd

Excel for Office 365 Excel for Office 365 for Mac Excel for the web Excel 2019 Excel 2016 Excel 2019 for Mac Excel 2013 Excel 2010 Excel 2007 Excel 2016 for Mac Excel for Mac 2011 Excel Starter 2010 Less

This article describes the formula syntax and usage of the function ETHOUNT in Microsoft Excel.

Description

Returns TRUE if the number is even and FALSE if the number is odd.

Syntax

EVEN(number)

The EVEN function syntax has the following arguments:

    Number Required. The value to check. If the number is not an integer, it is truncated.

Remarks

If the value of the number argument is not a number, the EVEN function returns the #VALUE! error value.

Example

Copy the sample data from the following table and paste it into cell A1 of a new Excel sheet. To display formula results, select them and press F2 followed by ENTER. Change the width of the columns, if necessary, to see all the data.

· Even numbers are those that are divisible by 2 without a remainder (for example, 2, 4, 6, etc.). Each such number can be written as 2K by choosing a suitable integer K (for example, 4 = 2 x 2, 6 = 2 x 3, etc.).

· Odd numbers are those that, when divided by 2, give a remainder of 1 (for example, 1, 3, 5, etc.). Each such number can be written as 2K + 1 by choosing a suitable integer K (for example, 3 = 2 x 1 + 1, 5 = 2 x 2 + 1, etc.).

  • Addition and subtraction:
    • Hexact ± H ethnoe = H ethnoe
    • Hexact ± H even = H even
    • Heven ± H ethnoe = H even
    • Heven ± H even = H ethnoe
  • Multiplication:
    • Hblack × H ethnoe = H ethnoe
    • Hblack × H even = H ethnoe
    • Heven × H even = H even
  • Division:
    • Hethnoe / H even - it is impossible to unambiguously judge the parity of the result (if the result integer, it can be either even or odd)
    • Hethnoe / H even --- if result integer, then it H ethnoe
    • Heven / H parity - the result cannot be an integer, and therefore have parity attributes
    • Heven / H even --- if result integer, then it H even

The sum of any number of even numbers is even.

The sum of an odd number of odd numbers is odd.

The sum of an even number of odd numbers is even.

The difference of two numbers is the same parity as their sum.
(ex. 2+3=5 and 2-3=-1 are both odd)

Algebraic (with + or - signs) sum of integers It has the same parity as their sum.
(e.g. 2-7+(-4)-(-3)=-6 and 2+7+(-4)+(-3)=2 are both even)


The idea of ​​parity has many different applications. The simplest of them:

1. If objects of two types alternate in some closed chain, then there are an even number of them (and of each type equally).

2. If objects of two types alternate in some chain, and the beginning and end of the chain of different types, then there is an even number of objects in it, if the beginning and end of the same type, then an odd number. (an even number of objects corresponds to odd number of transitions between them and vice versa !!! )

2". If the object alternates between two possible states, and the initial and final states different, then the periods of the object's stay in one state or another - even number, if the initial and final states are the same, then odd. (reformulation of paragraph 2)

3. Conversely: by the evenness of the length of an alternating chain, you can find out whether its beginning and end are of one or different types.

3". Conversely: by the number of periods of the object's stay in one of two possible alternating states, one can find out whether the initial state coincides with the final one. (reformulation of paragraph 3)

4. If objects can be divided into pairs, then their number is even.

5. If for some reason it was possible to divide an odd number of objects into pairs, then one of them will be a pair to itself, and there may be more than one such object (but there are always an odd number of them).

(!) All these considerations can be inserted into the text of the solution of the problem at the Olympiad, as obvious statements.

Examples:

Task 1. On the plane there are 9 gears connected in a chain (the first with the second, the second with the third ... the 9th with the first). Can they rotate at the same time?

Solution: No, they can't. If they could rotate, then two types of gears would alternate in a closed chain: rotating clockwise and counterclockwise (it does not matter for solving the problem, in which one direction of rotation of the first gear ! ) Then there should be an even number of gears, and there are 9 of them?! h.i.d. (sign "?!" means getting a contradiction)

Task 2. Numbers from 1 to 10 are written in a row. Is it possible to place + and - signs between them to get an expression equal to zero?
Solution: No. Parity of the resulting expression always will match parity amounts 1+2+...+10=55, i.e. sum will always be odd . Is 0 an even number? h.t.d.

When you need to prepare various kinds of reports, sometimes there is a need to highlight all paired and unpaired numbers in different colors. To solve this problem, the most rational way is conditional formatting.

How to find even numbers in Excel

A set of even and odd numbers that should be automatically highlighted in different colors:

Let's say we need to highlight paired numbers in green, and unpaired numbers in blue.



The two formulas differ only in the comparison operators before the value 0. Close the Rule Manager window by clicking the OK button.

As a result, we have cells that contain an unpaired number have a blue fill color, and cells with paired numbers have a green one.



MOD function in Excel to find even and odd numbers

The =MOD() function returns the remainder after dividing the first argument by the second. In the first argument, we specify a relative link, since the data is taken from each cell in the selected range. In the first conditional formatting rule, we specify the equal to =0 operator. Since any pair number divided by 2 (the second operator) has a remainder of division 0. If there is a pair number in the cell, the formula returns TRUE and the appropriate format is assigned. In the formula of the second rule, we use the "not equal" operator 0. Thus, we highlight odd numbers in blue in Excel. That is, the principle of operation of the second rule is inversely proportional to the first rule.

A bit of theory
Among the Olympiad problems for grades 5-6, a special group usually consists of those where it is required to use the properties of even (odd) numbers. Simple and obvious in themselves, these properties are easy to remember or derive, and often schoolchildren do not have any difficulties in studying them. But sometimes it is not easy to apply these properties and, most importantly, to guess what exactly they need to be applied for this or that proof. We list these properties here.


Considering problems with students in which these properties should be used, it is impossible not to consider those for the solution of which it is important to know the formulas for even and odd numbers. The experience of teaching these formulas to 5th-6th graders shows that many of them did not even think that any even number, like an odd number, can be expressed by a formula. Methodically, it can be useful to challenge the student with the question of writing first the formula for an odd number. The fact is that the formula for an even number looks clear and obvious, and the formula for an odd number is a kind of consequence of the formula for an even number. And if the student, in the process of studying new material for himself, thought, having paused for this, then he would rather remember both formulas than if he started with an explanation from the formula of an even number. Since an even number is a number that is divisible by 2, it can be written as 2n, where n is an integer, and an odd number, respectively, as 2n+1.

The following are some of the simpler odd/even problems that can be useful to consider as a light warm-up.

Tasks

1) Prove that it is impossible to pick up 5 odd numbers whose sum is 100.

2) There are 9 sheets of paper. Some of them were torn into 3 or 5 pieces. Some of the formed parts were again torn into 3 or 5 parts, and so on several times. Is it possible to get 100 parts after a few steps?

3) Is the sum of all natural numbers from 1 to 2019 even or odd?

4) Prove that the sum of two consecutive odd numbers is divisible by 4.

5) Is it possible to connect 13 cities by roads so that exactly 5 roads leave each city?

6) The director of the school wrote in his report that there are 788 students in the school, and there are 225 more boys than girls. But the inspecting inspector immediately reported that there was a mistake in the report. How did he reason?

7) Four numbers are written down: 0; 0; 0; 1. In one move, it is allowed to add 1 to any two of these numbers. Is it possible to get 4 identical numbers in several moves?

8) The chess knight left cell a1 and after a few moves came back. Prove that he made an even number of moves.

9) Is it possible to fold a closed chain of 2017 square tiles in such a way as shown in the figure?

10) Is it possible to represent the number 1 as a sum of fractions

11) Prove that if the sum of two numbers is an odd number, then the product of these numbers will always be an even number.

12) The numbers a and b are integers. It is known that a + b = 2018. Can the sum of 7a + 5b equal 7891?

13) In the parliament of some country there are two chambers with an equal number of deputies. All deputies took part in voting on an important issue. At the end of the vote, the chairman of parliament said that the proposal was adopted by a majority of 23 votes, with no abstentions. After that, one of the deputies said that the results were falsified. How did he guess?

14) There are several points on a straight line. A point is placed between two adjacent points. And so they put points further. After the point counted. Can the number of points be equal to 2018?

15) Petya has 100 rubles in one bill, and Andrey has pockets full of coins of 2 and 5 rubles each. In how many ways can Andrey change Petya's banknote?

16) Write five numbers in a line so that the sum of any two neighboring numbers is odd, and the sum of all numbers is even.

17) Is it possible to write six numbers in a line so that the sum of any two neighboring numbers is even, and the sum of all numbers is odd?

18) In the fencing section, there are 10 times more boys than girls, while in total there are no more than 20 people in the section. Will they be able to pair up? Will they be able to pair up if there are 9 times more boys than girls? What if it's 8 times more?

19) There are candies in ten boxes. In the first - 1, in the second - 2, in the third - 3, etc., in the tenth - 10. Petya is allowed to add three candies to any two boxes in one move. Will Petya be able to equalize the number of candies in the boxes in a few moves? Can Petya equalize the number of candies in the boxes by putting three candies into two boxes, if initially there are 11 boxes?

20) 25 boys and 25 girls are sitting at a round table. Prove that one of the people sitting at the table has both neighbors of the same sex.

21) Masha and several fifth graders stood in a circle, holding hands. It turned out that everyone was holding either two boys or two girls by the hand. If there are 10 boys in a circle, how many girls are there?

22) On the plane there are 11 gears connected in a closed chain, and the 11th is connected to the 1st. Can all gears turn at the same time?

23) Prove that a fraction is an integer for any natural n.

24) There are 9 coins on the table, and one of them is heads up, the others are tails up. Can all coins be put heads up if it is allowed to flip two coins at the same time?

25) Is it possible to arrange 25 natural numbers in a 5x5 table so that the sums in all rows are even, and in all columns - odd?

26) The grasshopper jumps in a straight line: the first time - by 1 cm, the second time by 2 cm, the third time by 3 cm, etc. Can he return to his old place after 25 jumps?

27) A snail crawls along a plane at a constant speed, turning at right angles every 15 minutes. Prove that it can return to the starting point only after an integer number of hours.

28) Numbers from 1 to 2000 are written out in a row. Is it possible to swap the numbers through one, rearrange them in reverse order?

29) There are 8 prime numbers written on the board, each of which is greater than two. Can their sum equal 79?

30) Masha and her friends stood in a circle. Both neighbors of any of the children are of the same sex. 5 boys, how many girls?