How to highlight even and odd numbers in different colors in Excel. How to highlight even and odd numbers in different colors in Excel Decimal notation of numbers

· 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 leave 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:
    • Even ± Even = Even
    • Even ± Odd = Odd
    • Odd ± Even = Odd
    • Odd ± Odd = Even
  • Multiplication:
    • Even × Even = Even
    • Even × Odd = Even
    • Odd × Odd = Odd
  • Division:
    • Even / Even - it is impossible to clearly judge the evenness of the result (if the result is an integer, then it can be either even or odd)
    • Even / Odd --- if the result is an integer, then it is Even
    • Odd / Even - the result cannot be an integer, and therefore have parity attributes
    • Odd / Odd --- if the result is an integer, then it is Odd

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 evenness is theirs sum.
(eg 2+3=5 and 2-3=-1 are both odd)

Algebraic(with + or - signs) sum of integers It has the same evenness is theirs sum.
(eg 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 are:

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

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

2". If an object alternates two possible states, and the initial and final states different, then the periods of an object’s stay in one state or another - even number, if the initial and final states coincide, then odd.

(rewording clause 2)

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

3". Conversely: by the number of periods an object remains in one of two possible alternating states, you can find out whether the initial state coincides with the final state. (reformulation of point 3)

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

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

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

Examples:

Problem 1. There are 9 gears on a plane 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 has no meaning for solving the problem, in which one exactly

direction the first gear rotates! ) Then there should be an even number of gears, but there are 9 of them?! h.i.t.c. (the "?!" sign indicates a contradiction)
Problem 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, you can't. Parity of the resulting expression Always will match the parity amounts 1+2+...+10=55, i.e. sum will always be odd

. Is 0 an even number?! etc.

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 EVEN function in Microsoft Excel.

Description

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

Syntax

EVEN(number)

    The arguments to the EVEN function are described below.

Number Required. The value being checked. If the number is not an integer, it is truncated.

Notes

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

Copy the sample data from the following table and paste it into cell A1 of a new Excel worksheet. To display the results of formulas, select them and press F2, then press Enter. If necessary, change the width of the columns to see all the data.

So, I'll start my story with even numbers. Which numbers are even? Any integer that can be divided by two without a remainder is considered even. In addition, even numbers end with one of the given digits: 0, 2, 4, 6 or 8.

For example: -24, 0, 6, 38 are all even numbers.

m = 2k — general formula writing even numbers, where k is an integer. This formula may be needed to solve many problems or equations in elementary grades.

There is another type of numbers in the vast kingdom of mathematics - odd numbers. Any number that cannot be divided by two without a remainder, but when divided by two there is a remainder equal to one, is usually called odd. Any of them ends with one of the following numbers: 1, 3, 5, 7 or 9.

Example of odd numbers: 3, 1, 7 and 35.

n = 2k + 1 is a formula that can be used to write down any odd numbers, where k is an integer.

Adding and subtracting even and odd numbers

There is a certain pattern in the addition (or subtraction) of even and odd numbers. We have presented it using the table below to make it easier for you to understand and remember the material.

Operation

Result

Example

Even + Even

Even + Odd

Odd

Odd + Odd

Even and odd numbers will behave the same way if you subtract them rather than add them.

Multiplying Even and Odd Numbers

When multiplying, even and odd numbers behave naturally. You will know in advance whether the result will be even or odd. The table below presents all possible options for better assimilation of information.

Operation

Result

Example

Even * Even

Even Odd

Odd * Odd

Odd

Now let's look at fractional numbers.

Decimal notation of a number

Decimals are numbers with a denominator of 10, 100, 1000, and so on, which are written without a denominator. The integer part is separated from the fractional part using a comma.

For example: 3.14; 5.1; 6,789 is all

You can do a variety of mathematical operations with decimals, such as comparison, addition, subtraction, multiplication, and division.

If you want to compare two fractions, first equalize the number of decimal places by adding zeros to one of them, and then, dropping the decimal point, compare them as whole numbers. Let's look at this with an example. Let's compare 5.15 and 5.1. First, let's equalize the fractions: 5.15 and 5.10. Now let's write them as integers: 515 and 510, therefore, the first number is greater than the second, which means 5.15 is greater than 5.1.

If you want to sum two fractions follow this simple rule: Start at the end of the fraction and add first (for example) hundredths, then tenths, then whole ones. Using this rule you can easily subtract and multiply decimals.

But you need to divide fractions like whole numbers, counting where you need to put a comma at the end. That is, first divide the whole part, and then the fractional part.

Decimal fractions should also be rounded. To do this, select to what digit you want to round the fraction and replace the corresponding number of digits with zeros. Keep in mind that if the digit following this digit was in the range from 5 to 9 inclusive, then the last digit that remains is increased by one. If the digit following this digit was in the range from 1 to 4 inclusive, then the last remaining digit is not changed.

Standard Features

The first method is possible using standard application functions. To do this, you need to create two additional columns with formulas:

  • Even numbers – insert the formula “= IF (REMAIN(number;2) =0;number;0)”, which will return the number if it is divisible by 2 without a remainder.
  • Odd numbers – insert the formula “=IF (REMAIN(number;2) =1;number;0)”, which will return the number if it is not divisible by 2 without a remainder.

Then you need to determine the sum over two columns using the “=SUM()” function.

The advantages of this method are that it will be understandable even to those users who do not know the application professionally.

The disadvantages of this method are that you have to add extra columns, which is not always convenient.

Custom function

The second method is more convenient than the first, because... it uses a custom function written in VBA – sum_num(). The function returns the sum of numbers as an integer. Either even numbers or odd numbers are summed, depending on the value of its second argument.

Function syntax: sum_num(rng;odd):

  • Argument rng – accepts the range of cells over which the summation is to be performed.
  • The odd argument takes the Boolean value TRUE for even numbers or FALSE for odd numbers.
  • Important: Only integers can be even or odd numbers, so numbers that do not meet the definition of an integer are ignored. Also, if the cell value is a term, then this row is not included in the calculation.

    Pros: no need to add new columns; better control over data.

    The disadvantages are the need to convert the file to .xlsm format for Excel versions starting from version 2007. Also, the function will only work in the workbook in which it is present.

    Using an Array

    The last method is the most convenient, because... does not require the creation of additional columns and programming.

    His solution is similar to the first option - they use the same formulas, but this method, thanks to the use of arrays, performs calculations in one cell:

    • For even numbers, insert the formula “=SUM (IF (REMINAL(cell_range,2) =0,cell_range,0))". After entering data into the formula bar, press the Ctrl + Shift + Enter keys simultaneously, which tells the application that the data needs to be processed as an array, and it will enclose it in curly braces;
    • For odd numbers, we repeat the steps, but change the formula “=SUM (IF (REMINAL(cell_range;2) =1;cell_range;0))".

    The advantage of this method is that everything is calculated in one cell, without additional columns and formulas.

    The only downside is that inexperienced users may not understand your entries.

    The figure shows that all methods return the same result; which one is better must be chosen for a specific task.

    You can download the file with the described options using this link.

    A little theory
    Among Olympiad problems for grades 5-6, usually a special group consists of those that require using the properties of even (odd) numbers. Simple and obvious in themselves, these properties are easy to remember or deduce, and often schoolchildren do not have any difficulties when studying them. But sometimes it can be difficult to apply these properties and, most importantly, to guess that they should be used for a particular proof. We list these properties here.

    When considering problems with students in which these properties should be used, one cannot help but consider those for which it is important to know the formulas for even and odd numbers. The experience of teaching these formulas to fifth- and sixth-graders shows that many of them did not even think that any even number, like an odd one, can be expressed by a formula. Methodologically, it can be useful to puzzle the student with the question of first writing 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 a student, in the process of studying new material for himself, thinks about it, pausing for this, then he is more likely to remember both formulas than if he starts with the 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.

    Below are the most simple tasks even/odd, which can be useful to consider as a light warm-up.

    Tasks

    1) Prove that it is impossible to find 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 resulting 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 exit from each city?

    6) The school director wrote in his report that there are 788 students in the school, with 225 more boys than girls. But the inspection inspector immediately reported that there was an error in the report. How did he reason?

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

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

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

    10) Can the number 1 be represented 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) Numbers a and b are integers. It is known that a + b = 2018. Can the sum of 7a + 5b be equal to 7891?

    13) The parliament of a certain country has two chambers with an equal number of deputies. In voting on important issue All deputies took part. At the end of the voting, the chairman of parliament said that the proposal was adopted by a majority of 23 votes, with no abstentions. After which 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 was placed between two adjacent points. And so they put points further. After the point was counted. Could 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. In how many ways can Andrey exchange Petya’s bill?

    16) Write down five numbers in a line so that the sum of any two adjacent 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 adjacent 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 split into pairs? Will they be able to split into pairs if there are 9 times more boys than girls? What if it’s 8 times more?

    19) Ten boxes contain sweets. 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 in two boxes, if initially there are 11 boxes?

    20) 25 boys and 25 girls are sitting at a round table. Prove that someone 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 the hands of either two boys or two girls. If there are 10 boys in a circle, how many girls are there?

    22) There are 11 gears on the plane, connected in a closed chain, with the 11th connected to the 1st. Can all the gears rotate at the same time?

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

    24) There are 9 coins on the table, one of them heads up, the others tails up. Is it possible to put all the coins heads up if you are 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 the sums in all columns are odd?

    26) The grasshopper jumps in a straight line: the first time - 1 cm, the second time - 2 cm, the third time - 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 a right angle every 15 minutes. Prove that she can return to the starting point only after an integer number of hours.

    28) Numbers from 1 to 2000 are written in a row. Is it possible to swap numbers one after another and rearrange them in reverse order?

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

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





    error: Content protected!!