Next Article in Journal
Calendar Effect and In-Sample Forecasting Applied to Mesothelioma Mortality Data
Previous Article in Journal
Human Networks and Toxic Relationships
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Magic Square and Arrangement of Consecutive Integers That Avoids k-Term Arithmetic Progressions

1
School of Mathematical Sciences, Sunway University, Selangor 47500, Malaysia
2
Institute of Mathematical Sciences, Universiti Malaya, Kuala Lumpur 50603, Malaysia
*
Author to whom correspondence should be addressed.
These authors contributed equally to this work.
Mathematics 2021, 9(18), 2259; https://doi.org/10.3390/math9182259
Submission received: 18 June 2021 / Revised: 28 August 2021 / Accepted: 30 August 2021 / Published: 14 September 2021

Abstract

:
In 1977, Davis et al. proposed a method to generate an arrangement of [ n ] = { 1 , 2 , , n } that avoids three-term monotone arithmetic progressions. Consequently, this arrangement avoids k-term monotone arithmetic progressions in [ n ] for k 3 . Hence, we are interested in finding an arrangement of [ n ] that avoids k-term monotone arithmetic progression, but allows k 1 -term monotone arithmetic progression. In this paper, we propose a method to rearrange the rows of a magic square of order 2 k 3 and show that this arrangement does not contain a k-term monotone arithmetic progression. Consequently, we show that there exists an arrangement of n consecutive integers such that it does not contain a k-term monotone arithmetic progression, but it contains a k 1 -term monotone arithmetic progression.

1. Introduction

A sequence a 1 , a 2 , , a n is said to have a k-term monotone arithmetic progression if there is a set of indices { i 1 < i 2 < < i k } such that the k-term subsequence a i 1 , a i 2 , , a i k is either an increasing or a decreasing arithmetic progression.
Davis et al. [1] proposed a way to generate an arrangement of [ n ] = { 1 , 2 , , n } that avoids three-term monotone arithmetic progressions. An arrangement of [ n ] is a sequence a 1 , a 2 , , a n such that { a 1 , a 2 , , a n } = [ n ] . An arrangement of [ n ] is also called a permutation of [ n ] .
Theorem 1
([1]). Let n 1 . There is a permutation of [ n ] that does not contain a three-term monotone arithmetic progression.
Let Z + be the set of positive integers. Davis et al. [1] and Sidorenko [2] showed that there is no permutation of Z + that avoids three-term monotone arithmetic progressions. However, they [1] showed that there exists permutations of Z + that avoid five-term monotone arithmetic progression, implying the existence of permutations of the integers avoiding arithmetic progressions of length seven. Recently, Geneson [3] constructed a permutation of the integers avoiding arithmetic progressions of length six. Up to now, an intriguing question, whose answer is still unknown, is whether there exists a permutation of Z + that avoids four-term monotone arithmetic progressions [4].
Let θ ( n ) denote the number of permutations of [ n ] that contain no three-term monotone arithmetic progressions. Davis et al. [1] established that 2 n 1 θ ( n ) n + 1 2 ! n + 1 2 ! . These bounds were then improved by [5,6,7]. LeSaulnier and Vijay [5] also showed that any permutation of the positive integers must contain a three-term arithmetic progression with an odd common difference as a subsequence and constructed a permutation of the positive integers that does not contain any four-term arithmetic progression with an odd common difference. Geneson [3] also proved a lower bound of 1 2 on the lower density of subsets of positive integers that can be permuted to avoid arithmetic progressions of length four, sharpening the lower bound of 1 3 from [5].
As a consequence of Theorem 1, there exists an arrangement of [ n ] that avoids k-term monotone arithmetic progression, where k 3 . However, up to now, there is no proposed arrangement of [ n ] that avoids a k-term monotone arithmetic progression, but contains a ( k 1 ) -term monotone arithmetic progression. In this paper, for k 3 , we show that the rows of a magic square of order 2 k 3 can be arranged in a way that the resulting arrangement does not contain a k-term monotone arithmetic progression, but it contains a ( k 1 ) -term monotone arithmetic progression. Then, we apply the result to show that there exists an arrangement of n consecutive integers such that it does not contain a k-term monotone arithmetic progression, but it contains a ( k 1 ) -term monotone arithmetic progression.

2. K -Term Monotone Arithmetic Progression

In this section, we prove that given any n consecutive integers with n k , there is an arrangement that avoids k-term monotone arithmetic progressions, but contains a ( k 1 ) -term monotone arithmetic progression.

2.1. Magic Square

In 1624 France, Claude Gaspard Bachet described the following “diamond method” for constructing odd ordered magic squares in his book Problèmes Plaisants [8].
Step 1:
First, for k 3 , we arrange [ 1 , ( 2 k 3 ) 2 ] in an ( 2 k 3 ) × ( 2 k 3 ) square. We extend a ( 2 k 3 ) × ( 2 k 3 ) square to form a diamond structure as in Figure 1. Then, we put the integers in order along descending diagonals into the square. For k = 3 and k = 4 , Figure 1 and Figure 2 illustrate the 3 × 3 and 5 × 5 extended squares, respectively.
Step 2:
Then, move the numbers on the right leftwards in the same row. Similarly, move the numbers on the left rightwards in the same row. Furthermore, move the numbers on the top downwards in the same column, and move the numbers at the bottom upwards in the same column. See Figure 3 and Figure 4 for k = 3 and 4. This gives a ( 2 k 3 ) × ( 2 k 3 ) magic square with magic sum ( 2 k 3 ) ( 2 k 3 ) 2 + 1 2 .
Let R i be the i-th row of the magic square constructed this way, i.e.,
R i = a i , 1 , b i , 1 , a i , 2 , b i , 2 , , a i , ( k 2 ) , b i , ( k 2 ) , a i , ( k 1 ) .
Note that for the first row R 1 , we have:
a 1 , j = 1 + ( k 2 ) ( 2 k 3 ) ( j 1 ) ( 2 k 4 ) , 1 j k 1 ; b 1 , j = k + ( 2 k 4 ) ( 2 k 3 ) ( j 1 ) ( 2 k 4 ) , 1 j k 2 .
For the last row R 2 k 3 , we have:
a ( 2 k 3 ) , j = k 1 + ( 2 k 4 ) ( 2 k 3 ) ( j 1 ) ( 2 k 4 ) , 1 j k 1 ; b ( 2 k 3 ) , j = 1 + ( k 3 ) ( 2 k 3 ) ( j 1 ) ( 2 k 4 ) , 1 j k 2 .
For row R k 1 , if k is odd, then:
a ( k 1 ) , j = 1 + ( 2 k 4 ) ( 2 k 3 ) 3 k 1 2 + j 3 ( 2 k 4 ) , 1 j k 1 2 ; a ( k 1 ) , j = 1 + ( 2 k 4 ) ( 2 k 3 ) j k 1 2 1 ( 2 k 4 ) , k 1 2 + 1 j k 1 ; b ( k 1 ) , j = 1 + ( 2 k 4 ) ( 2 k 3 ) k 1 2 + j 1 ( 2 k 4 ) , 1 j k 2 .
whereas if k is even, then:
a ( k 1 ) , j = 1 + ( 2 k 4 ) ( 2 k 3 ) k 2 + j 2 ( 2 k 4 ) , 1 j k 1 ; b ( k 1 ) , j = 1 + ( 2 k 4 ) ( 2 k 3 ) 3 k 2 + j 3 ( 2 k 4 ) , 1 j k 2 1 ; b ( k 1 ) , j = 1 + ( 2 k 4 ) ( 2 k 3 ) j k 2 ( 2 k 4 ) , k 2 j k 2 ,
For row R i with 2 i k 2 , if i is odd, then:
a i , j = 1 + ( k 3 + i ) ( 2 k 3 ) i 1 2 + j 1 ( 2 k 4 ) , 1 j k 1 ; b i , j = 1 + ( k 3 + i ) ( 2 k 3 ) i 1 2 + k + j 2 ( 2 k 4 ) , 1 j i 1 2 ; b i , j = k 1 + i + ( 2 k 4 ) ( 2 k 3 ) j i 1 2 1 ( 2 k 4 ) , i 1 2 + 1 j k 2 i 1 2 ; b i , j = 1 + ( k 3 + i ) ( 2 k 3 ) j k + 1 + i 1 2 ( 2 k 4 ) , k 1 i 1 2 j k 2 ,
whereas if i is even, then:
a i , j = 1 + ( k 3 + i ) ( 2 k 3 ) i 2 + k + j 3 ( 2 k 4 ) , 1 j i 2 ; a i , j = k 1 + i + ( 2 k 4 ) ( 2 k 3 ) j i 2 1 ( 2 k 4 ) , i 2 + 1 j k 1 i 2 ; a i , j = 1 + ( k 3 + i ) ( 2 k 3 ) j k + i 2 ( 2 k 4 ) , k i 2 j k 1 ; b i , j = 1 + ( k 3 + i ) ( 2 k 3 ) i 2 + j 1 ( 2 k 4 ) , 1 j k 2 .
For row R i with k i 2 k 4 , if i is odd, then:
a i , j = 2 + i k + ( 2 k 4 ) ( 2 k 3 ) k 2 1 + i 2 + j ( 2 k 4 ) , 1 j k 1 ; b i , j = 2 + i k + ( 2 k 4 ) ( 2 k 3 ) 2 k 3 1 + i 2 + j ( 2 k 4 ) , 1 j k 1 1 + i 2 ; b i , j = 1 + ( i k ) ( 2 k 3 ) j k + 1 + i 2 ( 2 k 4 ) , k 1 + i 2 j 1 + i 2 1 ; b i , j = 2 + i k + ( 2 k 4 ) ( 2 k 3 ) j 1 + i 2 ( 2 k 4 ) , 1 + i 2 j k 2 ,
whereas if i is even, then:
a i , j = 2 + i k + ( 2 k 4 ) ( 2 k 3 ) 2 k 4 i 2 + j ( 2 k 4 ) , 1 j k 1 i 2 ; a i , j = 1 + ( i k ) ( 2 k 3 ) j k + i 2 ( 2 k 4 ) , k i 2 j i 2 ; a i , j = 2 + i k + ( 2 k 4 ) ( 2 k 3 ) j i 2 1 ( 2 k 4 ) , i 2 + 1 j k 1 ; b i , j = 2 + i k + ( 2 k 4 ) ( 2 k 3 ) k 2 i 2 + j ( 2 k 4 ) , 1 j k 2 .

2.2. Arrangement That Avoids K-Term Arithmetic Progressions

In this section, we form a sequence P, which is an arrangement of the rows of the ( 2 k 3 ) × ( 2 k 3 ) magic square from Section 2.1 that avoids k-term arithmetic progressions.
Theorem 2.
Suppose k 4 . Let R i be the sequence of integers in the i-th row from left to right in the magic square formed by using the method in Section 2.1 where 1 i 2 k 3 . Then, the sequence P = R 1 , R 2 , , R k 2 , R k , R k + 1 , , R 2 k 4 , R 2 k 3 , R k 1 avoids k-term arithmetic progressions, but it has a ( k 1 ) -term arithmetic progression, k 1 , k , , 2 k 3 .
Remark 1.
Note that Theorem 2 is not true for k = 3 . In fact, the row R 3 = 3 , 5 , 7 has a three-term arithmetic progression.
Proof. 
Note that for k = 4 ,
P = 11 , 24 , 7 , 20 , 3 , 4 , 12 , 25 , 8 , 16 , 10 , 18 , 1 , 14 , 22 , 23 , 6 , 19 , 2 , 15 , 17 , 5 , 13 , 21 , 9 ,
does not contain a 4-term arithmetic progression, but has a 3-term arithmetic progression 3 , 4 , 5 . Therefore, we may assume that k 5 .
By Equations (1), (5) and (6), for 1 i k 2 , every integer in the row R i is either congruent with k 2 + i or k 1 + i mod ( 2 k 4 ) . By Equations (2), (7) and (8), for k i 2 k 3 , every integer in the row R i is either congruent with i k + 1 or i k + 2 mod ( 2 k 4 ) . Lastly, by Equations (3) and (4), every integer in the row R k 1 is congruent with 1 mod ( 2 k 4 ) . Note that the only integer congruent with 1 mod ( 2 k 4 ) in row R k 2 is ( 2 k 3 ) 2 , whereas the only integer congruent with 1 mod ( 2 k 4 ) in row R k is one. Thus, all the integers congruent with 1 mod ( 2 k 4 ) in [ ( 2 k 3 ) 2 ] appear in rows R k 2 , R k , and R k 1 . For r = 2 , 3 , , 2 k 4 , all the integers congruent with r mod ( 2 k 4 ) in [ ( 2 k 3 ) 2 ] appear in exactly two different rows.
Since k + j 2 is in R j for 1 j k 1 and P = R 1 , R 2 , , R k 2 , R k , R k + 1 , , R 2 k 4 , R 2 k 3 , R k 1 , the progression k 1 , k , , 2 k 3 is a ( k 1 ) -term arithmetic progression in P. Now, we proceed to show that P does not have any k-term arithmetic progressions. We prove it by contradiction. Assume that there exists a k-term monotone arithmetic progression T = { T 1 , T 2 , , T k } in P. Then, there exists a nonzero integer d such that:
T j = T 1 + ( j 1 ) d ,
for all 1 j k . Note that | d | ( 2 k 3 ) 2 1 k 1 = 4 k 8 .
Since:
P = R 1 , R 2 , , R k 2 , R k , R k + 1 , , R 2 k 4 , R 2 k 3 , R k 1 ,
T j should appear before T j + 1 if we read the elements from left to right in P. Thus, if T j is in R i for some i { 1 , 2 , , k 2 , k , k + 1 , , 2 k 3 } , then T j + 1 will be in R i where i i or i = k 1 , and if T j is in R k 1 , then T j + 1 will be in R k 1 . Furthermore, if T j and T j + 1 are both in R i for some 1 i 2 k 3 , then T j + 1 will appear after T j in the sequence P when we read from left to right.
Suppose T j = 1 or ( 2 k 3 ) 2 for some 2 j k 1 . If the former holds, then d = T j + 1 T j > 0 and d = T j T j 1 < 0 , a contradiction. If the latter holds, then d = T j + 1 T j < 0 and d = T j T j 1 > 0 , a contradiction. Hence, we may assume that T j 1 or ( 2 k 3 ) 2 for all 2 j k 1 .
If two consecutive terms of T are in R i for some 1 i 2 k 3 , then d ± 1 or 0 mod ( 2 k 4 ) . Suppose no two consecutive terms of T are in R i . This means that if T j is in R i j , then T j + 1 will be in R i j + 1 where i j + 1 > i j or i j + 1 = k 1 and i j { 1 , 2 , , k 2 , k , k + 1 , , 2 k 3 } . Since 2 k 3 2 = k 3 2 < k , either there exists 1 j 0 k 1 such that T j 0 and T j 0 + 1 are in R i 0 and R i 0 + 1 , respectively, for some i 0 { 1 , 2 , , k 3 , k , k + 1 , , 2 k 4 } or T j 0 and T j 0 + 1 are in R k 2 and R k , respectively, or T k 1 and T k are in R 2 k 3 and R k 1 , respectively. If such a j 0 exists, then d 0 , 1 or 2 mod ( 2 k 4 ) , otherwise, d k 2 or k 1 mod ( 2 k 4 ) .
Case 1:
Suppose d k 2 mod ( 2 k 4 ) . This means no two consecutive terms of T are in R i and T k 1 and T k are in R 2 k 3 and R k 1 , respectively. Furthermore, T k 1 mod ( 2 k 4 ) and T k 1 k 1 mod ( 2 k 4 ) . Note that T k 2 1 mod ( 2 k 4 ) . Therefore, T k 2 is in R k 2 , R k or R k 1 . If T k 2 is in R k 1 , then T k 1 will be in R k 1 , a contradiction. If T k 2 is in R k 2 , then T k 2 = ( 2 k 3 ) 2 , a contradiction. If T k 2 is in R k , then T k 2 = 1 , a contradiction.
Case 2:
Suppose d k 1 mod ( 2 k 4 ) . This means no two consecutive terms of T are in R i and T k 1 and T k are in R 2 k 3 and R k 1 , respectively. Furthermore, T k 1 mod ( 2 k 4 ) and T k 1 k 2 mod ( 2 k 4 ) . Note that T k 2 2 k 5 mod ( 2 k 4 ) and T k 3 k 4 mod ( 2 k 4 ) . If k = 5 , then T k 2 = T 3 is in R 1 or R 2 , whereas T k 3 = T 2 is in R 3 or R 5 . This is not possible as T 2 should appear before T 3 in the sequence P. Suppose k 6 . Now, T k 2 is in R k 3 or R k 4 , whereas T k 3 is in R 2 k 6 or R 2 k 5 , again not possible.
Case 3:
Suppose d 2 mod ( 2 k 4 ) . This means no two consecutive terms of T are in R i and there exists 1 j 0 k 1 such that T j 0 and T j 0 + 1 are in R i 0 and R i 0 + 1 , respectively, for some i 0 { 1 , 2 , , k 3 , k , k + 1 , , 2 k 4 } or T j 0 and T j 0 + 1 are in R k 2 and R k , respectively. Now, T 1 cannot be in R k 1 ; otherwise, T 2 will be in R k 1 . Note that T k 1 = T 1 + ( k 2 ) d T 1 mod ( 2 k 4 ) . Suppose T 1 is in R t for some 1 t k 2 . Then, T 1 k 2 + t or k 1 + t mod ( 2 k 4 ) . If T 1 1 mod ( 2 k 4 ) , then T 1 = ( 2 k 3 ) 2 . Since T k 1 1 , it must be in R k 1 . Therefore, T k is in R k 1 , a contradiction. Suppose T 1 ¬ 1 mod ( 2 k 4 ) . Since T k 1 must appear after T 1 in P, we have T 1 k 1 + t mod ( 2 k 4 ) and T 1 is in R t for some 1 t k 3 and T k 1 is in R t + 1 . This implies that either T k 2 is in the same row as T k 1 or T 2 is in the same row as T 1 , a contradiction. Similarly, we also cannot have T 1 in R t for some k t 2 k 3 .
Case 4:
Suppose d 1 mod ( 2 k 4 ) . Now, T 1 cannot be in R k 1 ; otherwise, T 2 will be in R k 1 and d T 2 T 1 0 mod ( 2 k 4 ) . Suppose T 1 is in R i for some 1 i k 2 . Then, T 1 is either congruent with k 2 + i or k 1 + i mod ( 2 k 4 ) . Suppose T 1 k 2 + i mod ( 2 k 4 ) . Then, T k i k 2 + i + ( k i 1 ) 1 mod ( 2 k 4 ) . Since T k i 1 and ( 2 k 3 ) 2 , it must be in R k 1 . Thus, T k i + 1 is also in R k 1 and d T k i + 1 T k i 0 mod ( 2 k 4 ) , a contradiction. Suppose T 1 k 1 + i mod ( 2 k 4 ) . Then, T k i 1 k 1 + i + ( k i 2 ) 1 mod ( 2 k 4 ) . If i k 3 , then T k i 1 must be in R k 1 . Therefore, T k i is also in R k 1 and d 0 mod ( 2 k 4 ) , a contradiction. Suppose i = k 2 . Then, T 1 1 mod ( 2 k 4 ) and it is in R k 2 . Therefore, T 1 = ( 2 k 3 ) 2 . Now, T k 1 + ( k 1 ) k mod ( 2 k 4 ) . Since k 5 , T k is in R 1 or R 2 , which is not possible as T 1 is in R k 2 .
Suppose T 1 is in R i for some k i 2 k 3 . Then, T 1 is either congruent with i k + 1 or i k + 2 mod ( 2 k 4 ) . Suppose T 1 i k + 2 mod ( 2 k 4 ) . Then, T k 2 i k + 2 + ( k 3 ) i 1 mod 2 k 3 . If i k + 1 , then T k 2 is in R i k + 1 or R i k , which is not possible. If i = k , then T k 2 k 1 mod ( 2 k 4 ) and T k 1 k mod ( 2 k 4 ) . Therefore, T k 1 is in R 1 or R 2 , again not possible. Suppose T 1 i k + 1 mod ( 2 k 4 ) . Then, T k 1 i k + 1 + ( k 2 ) i 1 mod ( 2 k 4 ) . If i k + 1 , then T k 1 is in R i k + 1 or R i k , which is not possible. If i = k , then T k 1 k 1 mod ( 2 k 4 ) and T k k mod ( 2 k 4 ) . Therefore, T k is in R 1 or R 2 , again not possible.
Case 5:
Suppose d 1 mod ( 2 k 4 ) .
If two consecutive terms of T, say T j and T j + 1 are in R k 1 , then d = T j + 1 T j 0 mod ( 2 k 4 ) , a contradiction. Suppose T j and T j + 1 are in R 1 . Then, T j k mod ( 2 k 4 ) and T j + 1 k 1 mod ( 2 k 4 ) . By Equation (1), T j = b 1 , j 1 for some 1 j 1 k 2 and T j + 1 = a 1 , j 2 for some 1 j 2 k 1 . Now,
d = T j + 1 T j = a 1 , j 2 b 1 , j 1 a 1 , 1 b 1 , ( k 2 ) = 1 + ( k 2 ) ( 2 k 3 ) k + ( 2 k 4 ) ( 2 k 3 ) ( k 3 ) ( 2 k 4 ) = 1 2 ( 2 k 3 ) = 4 k + 7 .
Therefore, | d | 4 k 7 > 4 k 8 , a contradiction.
Suppose T j and T j + 1 are in R 2 k 3 . Then, T j k 1 mod ( 2 k 4 ) and T j + 1 k 2 mod ( 2 k 4 ) . By Equation (2), T j = a ( 2 k 3 ) , j 1 for some 1 j 1 k 1 and T j + 1 = b ( 2 k 3 ) , j 2 for some 1 j 2 k 2 . Furthermore, j 2 j 1 . Now,
d = T j + 1 T j = b ( 2 k 3 ) , j 2 b ( 2 k 3 ) , j 1 + b ( 2 k 3 ) , j 1 a ( 2 k 3 ) , j 1 b ( 2 k 3 ) , j 1 a ( 2 k 3 ) , j 1 = 1 + ( k 3 ) ( 2 k 3 ) k 1 + ( 2 k 4 ) ( 2 k 3 ) = 2 k ( k 1 ) ( 2 k 3 ) = 1 ( k 1 ) ( 2 k 2 ) .
Therefore, | d | ( k 1 ) ( 2 k 2 ) 1 > 4 k 8 , a contradiction. Hence, we may assume that no consecutive terms of T are in R 1 , R 2 k 3 or R k 1 .
Suppose T 1 is in R 1 . Then, T 1 is either congruent with k 1 or k mod ( 2 k 4 ) . Suppose T 1 k mod ( 2 k 4 ) . Then, T 2 k 1 mod ( 2 k 4 ) . Note that T 2 is not in R 1 , for no two consecutive terms of T are in R 1 . Therefore, T 2 is in R 2 k 3 . This means T 3 is in R k 1 , for no two consecutive terms of T are in R 2 k 3 . Therefore, T 4 must be in R k 1 , a contradiction as no two consecutive terms of T are in R k 1 .
Suppose T 1 k 1 mod ( 2 k 4 ) . Then, T k 1 k 1 + ( k 2 ) ( 1 ) 1 mod ( 2 k 4 ) . Therefore, T k 1 is in R k 2 , R k , or R k 1 . Note that T k 1 cannot be in R k 1 , otherwise T k will be in R k 1 . If T k 1 is in R k 2 , then T k 1 = ( 2 k 3 ) 2 , a contradiction. If T k 1 is in R k , then T k 1 = 1 , a contradiction.
Suppose T 1 is in R i for some 2 i k 2 . Then, T 1 is either congruent with k 2 + i or k 1 + i mod ( 2 k 4 ) . Suppose T 1 k 1 + i mod ( 2 k 4 ) . Then, T 2 k 2 + i mod ( 2 k 4 ) and T 3 k 3 + i mod ( 2 k 4 ) . Since T 2 is not in R i 1 , it must be in R i . If i = 2 , then T 3 must be in R 2 k 3 , for it cannot be in R 1 . Since T 4 k 2 mod ( 2 k 4 ) , we must have T 4 in R 2 k 3 or R 2 k 4 . Both cases also cannot happen. If i 3 , then T 3 is in R i 1 or R i 2 , which is not possible. Suppose T 1 k 2 + i mod ( 2 k 4 ) . Then, T 2 k 3 + i mod ( 2 k 4 ) . If i = 2 , then T 2 must be in R 2 k 3 . Since T 3 is not in R 2 k 3 , it must be in R k 1 . However, then T 4 is also in R k 1 , a contradiction. If i 3 , then T 2 is in R i 1 or R i 2 , which is not possible.
Suppose T 1 is in R i for some k i 2 k 3 . Then, T 1 is either congruent with i k + 1 or i k + 2 mod ( 2 k 4 ) . Suppose T 1 i k + 2 mod ( 2 k 4 ) . Then, T i k + 2 i k + 2 + ( i k + 1 ) ( 1 ) 1 mod ( 2 k 4 ) . Therefore, T i k + 2 is in R k 2 , R k , or R k 1 . Note that T i k + 2 cannot be in R k 1 ; otherwise, T i k + 3 will be in R k 1 . If T i k + 2 is in R k 2 , then T i k + 2 = ( 2 k 3 ) 2 , a contradiction. If T i k + 2 is in R k , then T i k + 2 = 1 , a contradiction.
Case 6:
Suppose d 0 mod ( 2 k 4 ) .
Then, T j T 1 mod ( 2 k 4 ) for all j and d = ± ( 2 k 4 ) or d = ± ( 4 k 8 ) . If d = 4 k 8 , then T k = T 1 + ( k 1 ) d 1 + ( k 1 ) ( 4 k 8 ) = ( 2 k 3 ) 2 . Therefore, we must have T 1 = 1 and T k = ( 2 k 3 ) 2 . Therefore, T 1 is in row R k , whereas T k is in R k 2 , which is not possible. If d = ( 4 k 8 ) , then T k = T 1 + ( k 1 ) d ( 2 k 3 ) 2 ( k 1 ) ( 4 k 8 ) = 1 . Therefore, we must have T 1 = ( 2 k 3 ) 2 and T k = 1 . Now, T j T 1 1 mod ( 2 k 4 ) for 2 j k 1 imply that T j R k 1 for all 2 j k 1 . This is also not possible as T 2 should appear after T 1 , but before T k in P. Hence, we may assume that d = ± ( 2 k 4 ) .
Case 6.1:
Suppose T 1 1 mod ( 2 k 4 ) . Then, T j is either in R k 2 , R k or R k 1 for all j. Note that T j 1 and ( 2 k 3 ) 2 for all 2 j k . Therefore, we may assume that T j is in R k 1 for all 2 j k .
Case 6.1.1:
Suppose k is odd. Let
A 1 = { s [ k ] : T s = a ( k 1 ) , j for   some   1 j k 1 2 } ; A 2 = { s [ k ] : T s = a ( k 1 ) , j for   some   k 1 2 + 1 j k 1 } ; A 3 = { s [ k ] : T s = b ( k 1 ) , j for   some   1 j k 2 } .
Note that A 1 , A 2 , and A 3 are disjoint. By Equation (3), | A 1 | + | A 2 | + | A 3 | k 1 4 . Therefore, one of the A t where t { 1 , 2 , 3 } must contain at least two elements. Thus, d = ( 2 k 4 ) .
Suppose A 1 . If k A 1 , then T s 1 = a ( k 1 ) , k 1 2 for some 1 s 1 k 1 . Now,
T s 1 = 1 + ( 2 k 4 ) ( 2 k 3 ) 3 k 1 2 + k 1 2 3 ( 2 k 4 ) = 1 + ( 2 k 4 )
and T s 1 + 1 = 1 + ( 2 k 4 ) ( 2 k 4 ) = 1 . Therefore, T s 1 + 1 is in R k . This is not possible. Thus, if A 1 , then k A 1 .
Suppose A 2 . If k A 2 , then T s 2 = a ( k 1 ) , k 1 for some 1 s 2 k 1 . Since a ( k 1 ) , k 1 is the last term in R k 1 , T s 2 + 1 is not in R k 1 , a contradiction. Thus, if A 2 , then k A 2 .
Suppose A 3 . If k A 3 , then T s 3 = b ( k 1 ) , k 2 for some 1 s 3 k 1 . Now, a ( k 1 ) , k 1 is the last term in R k 1 . Therefore, T s 3 + 1 = a ( k 1 ) , k 1 and:
d = T s 3 + 1 T s 3 = k 1 2 + k 2 1 ( 2 k 4 ) k 1 k 1 2 1 ( 2 k 4 ) = ( k 2 ) ( 2 k 4 ) ,
a contradiction. Thus, if A 3 , then k A 3 .
Hence, A t 0 for exactly one t 0 [ 3 ] . Now, | A 1 | k 1 2 < k 1 , | A 2 | k 1 2 < k 1 , and | A 3 | k 2 < k 1 . Thus, k 1 | A 1 | + | A 2 | + | A 3 | = | A t 0 | < k 1 , a contradiction.
Case 6.1.2:
Suppose k is even. Let:
A 1 = { s [ k ] : T s = a ( k 1 ) , j for   some   1 j k 1 } ; A 2 = { s [ k ] : T s = b ( k 1 ) , j for   some   1 j k 2 1 } ; A 3 = { s [ k ] : T s = b ( k 1 ) , j for   some   k 2 j k 2 } .
Note that A 1 , A 2 , and A 3 are disjoint. By Equation (4), | A 1 | + | A 2 | + | A 3 | k 1 4 . Therefore, one of the A t where t { 1 , 2 , 3 } must contain at least two elements. Thus, d = ( 2 k 4 ) .
Suppose A 1 . If k A 1 , then T s 1 = a ( k 1 ) , k 1 for some 1 s 1 k 1 . Since a ( k 1 ) , k 1 is the last term in R k 1 , T s 1 + 1 is not in R k 1 , a contradiction. Thus, if A 1 , then k A 1 .
Suppose A 2 . If k A 2 , then T s 2 = b ( k 1 ) , k 2 1 for some 1 s 2 k 1 . Now,
T s 2 = 1 + ( 2 k 4 ) ( 2 k 3 ) 3 k 2 + k 2 1 3 ( 2 k 4 ) = 1 + ( 2 k 4 )
and T s 2 + 1 = 1 + ( 2 k 4 ) ( 2 k 4 ) = 1 . Therefore, T s 2 + 1 is in R k . This is not possible. Thus, if A 2 , then k A 2 .
Suppose A 3 . If k A 3 , T s 3 = b ( k 1 ) , k 2 for some 1 s 3 k 1 . Now, a ( k 1 ) , k 1 is the last term in R k 1 . Therefore, T s 3 + 1 = a ( k 1 ) , k 1 and:
d = T s 3 + 1 T s 3 = k 2 k 2 ( 2 k 4 ) k 2 + k 1 2 ( 2 k 4 ) = ( k 1 ) ( 2 k 4 ) ,
a contradiction. Thus, if A 3 , then k A 3 .
Hence, A t 0 for exactly one t 0 [ 3 ] . Now, | A 1 | k 1 , | A 2 | k 2 1 < k 1 , and | A 3 | k 2 1 < k 1 . Thus, t 0 = 1 and T 2 = a ( k 1 ) , 1 . This means T 1 can only be in R k 2 or R k . Since d < 0 , T 1 must be in R k , that is T 1 = ( 2 k 3 ) 2 . Now,
d = T 2 T 1 = 1 + ( 2 k 4 ) ( 2 k 3 ) k 2 + 1 2 ( 2 k 4 ) ( 2 k 3 ) 2 = k 2 ( 2 k 4 ) ,
a contradiction.
Case 6.2:
Suppose T 1 k 1 mod ( 2 k 4 ) . Then T j is either in R 1 or R 2 k 3 for all j. Since there are at most k 1 integers in R 2 k 3 that are congruent with k 1 mod ( 2 k 4 ) , we must have T 1 in R 1 . Suppose both T 1 and T 2 are in R 1 . By Equation (1), we must have d = ( 2 k 4 ) and T 1 = a 1 , l and T 2 = a 1 , l + 1 for some 1 l k 2 . Since there are at most k 1 integers in R 1 that are congruent with k 1 mod ( 2 k 4 ) , we must have T k in R 2 k 3 . The largest integer congruent with k 1 mod ( 2 k 4 ) in R 1 is a 1 , 1 = 1 + ( k 2 ) ( 2 k 3 ) , and the smallest integer congruent with k 1 mod ( 2 k 4 ) in R 2 k 3 is a ( 2 k 3 ) , k 1 = k 1 + ( 2 k 4 ) ( 2 k 3 ) ( k 2 ) ( 2 k 4 ) = ( k 1 ) ( 2 k 3 ) . Note that a 1 , 1 a ( 2 k 3 ) , k 1 = ( 2 k 4 ) . Let s be the smallest integer such that T s is in R 1 and T s + 1 is in R 2 k 3 . Since both T 1 and T 2 are in R 1 , T s a 1 , 1 . Therefore,
2 k 4 = T s T s + 1 = ( T s a 1 , 1 ) + a 1 , 1 a ( 2 k 3 ) , k 1 + ( a ( 2 k 3 ) , k 1 T s + 1 ) 0 ( 2 k 4 ) + 0 < 0 ,
a contradiction. Suppose T 1 is in R 1 , but T 2 is in R 2 k 3 . Then, we must have T j = a ( 2 k 3 ) , j 1 for all 2 j k . By Equation (2), d = T 3 T 2 = a ( 2 k 3 ) , 2 a ( 2 k 3 ) , 1 = ( 2 k 4 ) . On the other hand,
2 k 4 = T 1 T 2 a 1 , 1 a ( 2 k 3 ) , 1 = 1 + ( k 2 ) ( 2 k 3 ) ( k 1 + ( 2 k 4 ) ( 2 k 3 ) ) = ( k 2 ) ( 2 k 2 ) < 0 ,
a contradiction.
Case 6.3:
Suppose T 1 r mod ( 2 k 4 ) where k r 2 k 4 . Then, for all j, T j is either in R r k + 1 or R r k + 2 .
Case 6.3.1:
Suppose r k + 1 is odd. Let:
A 1 = { s [ k ] : T s = b r k + 1 , j for   some   r k 2 + 1 j k 2 r k 2 } ; A 2 = { s [ k ] : T s = a r k + 2 , j for   some   1 j r k + 2 2 } ; A 3 = { s [ k ] : T s = a r k + 2 , j for   some   k r k + 2 2 j k 1 } ; A 4 = { s [ k ] : T s = b r k + 2 , j for   some   1 j k 2 } .
Note that A 1 , A 2 , A 3 , and A 4 are disjoint. By Equations (5) and (6) (or Equations (1) and (6) when r = k ), | A 1 | + | A 2 | + | A 3 | + | A 4 | = k 5 . Therefore, one of the A t where t { 1 , 2 , 3 , 4 } must contain at least two elements. Thus, d = ( 2 k 4 ) .
Suppose A 4 . If k A 4 , then T s 4 = b r k + 2 , k 2 for some 1 s 4 k 1 . Now, a r k + 2 , k 1 is the last term in R r k + 2 . Therefore, T s 4 + 1 = a r k + 2 , k 1 and:
d = T s 4 + 1 T s 4 = k 1 k + r k + 2 2 ( 2 k 4 ) + r k + 2 2 + k 2 1 ( 2 k 4 ) = ( k 2 ) ( 2 k 4 ) > 0 ,
a contradiction. Thus, if A 4 , then k A 4 . Now, if 1 A 4 , then T s 5 = b r k + 2 , 1 for some 2 s 5 k . By Equation (6), T s 5 1 = a r k + 2 , k 1 . This is not possible as T s 5 1 should appear before T s 5 in P. Thus, if A 4 , then one and k must be in A 4 . This implies that j A 4 for all 1 j k . This is not possible as | A 4 | k 2 . Hence, A 4 = and | A 1 | + | A 2 | + | A 3 | = k .
Suppose A 2 . If k A 2 , then T s 2 = a r k + 2 , r k + 2 2 for some 1 s 2 k 1 . Now,
T s 2 = 1 + ( k 3 + r k + 2 ) ( 2 k 3 ) r k + 2 2 + k + r k + 2 2 3 ( 2 k 4 ) = r ,
and T s 2 + 1 = r ( 2 k 4 ) 0 , a contradiction. Thus, if A 2 , then k A 2 .
Suppose A 3 . If k A 3 , then T s 3 = a r k + 2 , k 1 for some 1 s 3 k 1 . Since a r k + 2 , k 1 is the last term in R r k + 2 , T s 3 + 1 is not in R r k + 2 , a contradiction. Thus, if A 3 , then k A 3 .
Hence, A t 0 for at most one t 0 { 2 , 3 } . If A 3 = , then:
k = | A 1 | + | A 2 | k ( r k + 2 ) + r k + 2 2 = k r k + 2 2 < k ,
a contradiction. Similarly, if A 2 = , then k = | A 1 | + | A 3 | < k , again a contradiction.
Case 6.3.2:
Suppose r k + 1 is even. Let:
A 1 = { s [ k ] : T s = a r k + 1 , j for   some   r k + 1 2 + 1 j k 1 r k + 1 2 } ; A 2 = { s [ k ] : T s = a r k + 2 , j for   some   1 j k 1 } ; A 3 = { s [ k ] : T s = b r k + 2 , j for   some   1 j r k + 1 2 } ; A 4 = { s [ k ] : T s = b r k + 2 , j for   some   k 1 r k + 1 2 j k 2 } .
Note that A 1 , A 2 , A 3 , and A 4 are disjoint. By Equations (5) and (6), | A 1 | + | A 2 | + | A 3 | + | A 4 | = k 5 . Therefore, one of the A t where t { 1 , 2 , 3 , 4 } must contain at least two elements. Thus, d = ( 2 k 4 ) .
Suppose A 2 . If k A 2 , then T s 2 = a r k + 2 , k 1 for some 1 s 2 k 1 . Since a r k + 2 , k 1 is the last term in R r k + 2 , T s 2 + 1 is not in R r k + 2 , a contradiction. Thus, if A 2 , then k A 2 . Now, if T 1 is not in A 2 , then T s 5 = a r k + 2 , 1 for some 2 s 5 k . By Equation (5) T s 5 1 = b r k + 2 , k 2 . This is not possible as T s 5 1 should appear before T s 5 in P. Thus, if A 2 , then one and k must be in A 2 . This implies that j A 2 for all 1 j k . This is not possible as | A 2 | k 1 . Hence, A 2 = and | A 1 | + | A 3 | + | A 4 | = k .
Suppose A 3 . If k A 3 , then T s 3 = b r k + 2 , r k + 1 2 for some 1 s 3 k 1 . Now,
T s 3 = 1 + ( k 3 + r k + 2 ) ( 2 k 3 ) r k + 1 2 + k + r k + 1 2 2 ( 2 k 4 ) = r ,
and T s 3 + 1 = r ( 2 k 4 ) 0 , a contradiction. Thus, if A 3 , then k A 3 .
Suppose A 4 . If k A 4 , then T s 4 = b r k + 2 , k 2 for some 1 s 4 k 1 . By Equation (5), T s 4 + 1 = a r k + 2 , 1 , which is not possible. Thus, if A 4 , then k A 4 .
Hence, A t 0 for at most one t 0 { 3 , 4 } . If A 3 = , then:
k = | A 1 | + | A 4 | k 1 ( r k + 1 ) + r k + 1 2 = k 1 r k + 1 2 < k ,
a contradiction. Similarly, if A 4 = , then k = | A 1 | + | A 3 | < k , again a contradiction.
Case 6.4:
Suppose T 1 r mod ( 2 k 4 ) where 2 r k 2 . Then, T j is either in R k 2 + r or R k 1 + r for all j.
Case 6.4.1:
Suppose k 2 + r is odd. Let:
A 1 = { s [ k ] : T s = a k 2 + r , j for   some   1 j k 1 } ; A 2 = { s [ k ] : T s = b k 2 + r , j for   some   1 j k 1 k 1 + r 2 } ; A 3 = { s [ k ] : T s = b k 2 + r , j for   some   k 1 + r 2 j k 2 } ; A 4 = { s [ k ] : T s = a k 1 + r , j for   some   k k 1 + r 2 j k 1 + r 2 } .
Note that A 1 , A 2 , A 3 , and A 4 are disjoint. By Equations (7) and (8), | A 1 | + | A 2 | + | A 3 | + | A 4 | = k 5 . Therefore, one of the A t where t { 1 , 2 , 3 , 4 } must contain at least two elements. Thus, d = ( 2 k 4 ) .
Suppose A 1 . If k A 1 , then T s 1 = a k 2 + r , k 1 for some 1 s 1 k 1 . Therefore, T s 1 + 1 = b k 2 + r , 1 , and this is not possible. Thus, if A 1 , then k A 1 . Now, if 1 A 1 , then T s 5 = a k 2 + r , 1 for some 2 s 5 k . Therefore, T s 5 1 = b k 2 + r , k 2 , again not possible. Thus, if A 1 , then one and k must be in A 1 . This implies that j A 1 for all 1 j k . Therefore, k = | A 1 | k 1 , a contradiction. Hence, A 1 = and | A 2 | + | A 3 | + | A 4 | = k .
Suppose A 2 . If 1 A 2 , then T s 2 = b k 2 + r , 1 for some 2 s 2 k . Therefore, T s 2 1 = a k 2 + r , k 1 , and this is not possible. Thus, if A 2 , then 1 A 2 .
Suppose A 3 . If 1 A 3 , then T s 3 = b k 2 + r , k 1 + r 2 for some 2 s 3 k . Therefore,
T s 3 = 2 + k 2 + r k + ( 2 k 4 ) ( 2 k 3 ) = r + ( 2 k 4 ) ( 2 k 3 ) ,
and T s 3 1 = r + ( 2 k 4 ) ( 2 k 2 ) > ( 2 k 3 ) 2 , a contradiction. Thus, if A 3 , then 1 A 3 . Hence, A t 0 for at most one t 0 { 2 , 3 } . If A 3 = , then:
k = | A 2 | + | A 4 | k 1 k 1 + r 2 + r = k 1 + r 2 < k ,
a contradiction. Similarly, if A 2 = , then k = | A 3 | + | A 4 | < k , again a contradiction.
Case 6.4.2:
Suppose k 2 + r is even. Let:
A 1 = { s [ k ] : T s = a k 2 + r , j for   some   1 j k 1 k 2 + r 2 } ; A 2 = { s [ k ] : T s = a k 2 + r , j for   some   k 2 + r 2 + 1 j k 1 } ; A 3 = { s [ k ] : T s = b k 2 + r , j for   some   1 j k 2 } ; A 4 = { s [ k ] : T s = b k 1 + r , j for   some   k k + r 2 j k + r 2 1 } .
Note that A 1 , A 2 , A 3 , and A 4 are disjoint. By Equations (7) and (8) (or Equations (2) and (6) when r = k 2 ), | A 1 | + | A 2 | + | A 3 | + | A 4 | = k 5 . Therefore, one of the A t where t { 1 , 2 , 3 , 4 } must contain at least two elements. Thus, d = ( 2 k 4 ) .
Suppose A 3 . If k A 3 , then T s 3 = b k 2 + r , k 2 for some 1 s 3 k 1 . Therefore, T s 3 + 1 = a k 2 + r , 1 , and this is not possible. Thus, if A 3 , then k A 3 . Now, if 1 A 3 , then T s 5 = b k 2 + r , 1 for some 2 s 5 k . Therefore, T s 5 1 = a k 2 + r , k 1 , again not possible. Thus, if A 3 , then one and k must be in A 3 . This implies that j A 3 for all 1 j k . Therefore, k = | A 3 | k 2 , a contradiction. Hence, A 3 = and | A 1 | + | A 2 | + | A 4 | = k .
Suppose A 1 . If 1 A 1 , then T s 1 = a k 2 + r , 1 for some 2 s 1 k . Therefore, T s 1 1 = b k 2 + r , k 2 , and this is not possible. Thus, if A 1 , then 1 A 1 .
Suppose A 2 . If 1 A 2 , then T s 2 = a k 2 + r , k 2 + r 2 + 1 for some 2 s 2 k . Therefore,
T s 2 = 2 + k 2 + r k + ( 2 k 4 ) ( 2 k 3 ) = r + ( 2 k 4 ) ( 2 k 3 ) ,
and T s 2 1 = r + ( 2 k 4 ) ( 2 k 2 ) > ( 2 k 3 ) 2 , a contradiction. Thus, if A 2 , then 1 A 2 . Hence, A t 0 for at most one t 0 { 1 , 2 } . On the other hand, if A 1 = , then:
k = | A 2 | + | A 4 | k 1 k 2 + r 2 + r = k 2 + r 2 + 1 < k ,
a contradiction. Similarly, if A 2 = , then k = | A 1 | + | A 4 | < k , again a contradiction.
Hence, P does not contain any k-term monotone arithmetic progressions. This completes the proof of the theorem. □
Corollary 1.
Let k 3 . For each integer n with k n ( 2 k 3 ) 2 , there is an arrangement of [ n ] that avoids k-term arithmetic progressions, but contains a ( k 1 ) -term arithmetic progression.
Proof. 
For k = 3 , the sequence P = 1 , 9 , 5 , 3 , 7 , 2 , 8 , 4 , 6 avoids three-term arithmetic progressions. Now, for 3 n 9 , remove n + 1 , n + 2 , , 9 from P, and denote the resulting sequence as P . For instance, if n = 8 , then P = 1 , 5 , 3 , 7 , 2 , 8 , 4 , 6 , and if n = 5 , then P = 1 , 5 , 3 , 2 , 4 . Note that P avoids three-term arithmetic progressions. Therefore, we may assume that k 4 .
Suppose 2 k 3 n ( 2 k 3 ) 2 . First, we show that if n = ( 2 k 3 ) 2 , then there is an arrangement of [ n ] that avoids k-term arithmetic progressions, but contains a ( k 1 ) -term arithmetic progression. By Theorem 2, such an arrangement exists. Let us denote the arrangement by P. Now, remove n + 1 , n + 2 , , ( 2 k 3 ) 2 from P, and denote the resulting sequence as P . Note that P avoids k-term arithmetic progressions, but contains a ( k 1 ) -term arithmetic progression, that is k 1 , k , , 2 k 3 .
Suppose k n 2 k 3 . Let Q = 2 k 3 , 2 k 4 , , k , 1 , 2 , , k 1 . Then, it avoids k-term arithmetic progressions, but contains a ( k 1 ) -term arithmetic progression, that is 1 , 2 , , k 1 . Now, remove n + 1 , n + 2 , , ( 2 k 3 ) from Q, and denote the resulting sequence as Q . Thus, Q avoids k-term arithmetic progressions, but contains a ( k 1 ) -term arithmetic progression, that is 1 , 2 , , k 1 . □
Lemma 1.
Let b n = s a n + r for some real numbers r , s . Then, the sequence a 1 , a 2 , , a n contains a k-term monotone arithmetic progression if and only if b 1 , b 2 , , b n contains a k-term monotone arithmetic progression.
Proof. 
It is sufficient to show that if a 1 , a 2 , , a n contains a k-term monotone arithmetic progression, then b 1 , b 2 , , b n contains a k-term monotone arithmetic progression. Let i 1 < i 2 < < i k be such that a i 1 , a i 2 , , a i k is a k-term monotone arithmetic progression. Therefore,
a i j = a i 1 + ( j 1 ) d
for some real number d. This implies that:
b i j = s a i j + r = s ( a i 1 + ( j 1 ) d ) + r = ( s a i 1 + r ) + ( j 1 ) s d = b i 1 + ( j 1 ) s d .
Hence, b i 1 , b i 2 , , b i k is a k-term monotone arithmetic progression. □
Let x be the smallest integer such that x 1 < x x and x be the largest integer such that x x < x + 1 .
Theorem 3.
Let k 3 . For each integer n with n k , there is an arrangement of [ n ] that avoids k-term arithmetic progressions, but contains a ( k 1 ) -term arithmetic progression.
Proof. 
By Corollary 1, this theorem is true for n ( 2 k 3 ) 2 . Now, we may assume n > ( 2 k 3 ) 2 . We also assume that the theorem is true for all n such that n < n . Let [ n ] = A 1 A 2 where A 1 and A 2 are odd and even integers, respectively. Note that | A 1 | = n 2 and | A 2 | = n 2 . Note that:
A 1 = 2 j 1 : 1 j n 2 ; A 2 = 2 j : 1 j n 2 .
Since n 2 < n , by assumption, the theorem is true for n 2 . Let P 1 = a 1 , a 2 , , a n 2 be an arrangement of n 2 that avoids k-term arithmetic progressions, but contains a ( k 1 ) -term arithmetic progression. Furthermore, let P 2 = b 1 , b 2 , , b n 2 be an arrangement of n 2 that avoids k-term arithmetic progressions, but contains a ( k 1 ) -term arithmetic progression. We claim that:
P = 2 a 1 1 , 2 a 2 1 , , 2 a n 2 1 , 2 b 1 , 2 b 2 , , 2 b n 2
is an arrangement that avoids k-term arithmetic progressions, but contains a ( k 1 ) -term arithmetic progression. In fact, if T 1 , T 2 , , T k is a k-term monotone arithmetic progression in P, then T j = T 1 + ( j 1 ) d . Let:
A 1 = { s [ k ] : T s = 2 a j 1 for   some   1 j n 2 } ; A 2 = { s [ k ] : T s = 2 b j for   some   1 j n 2 } .
Since k 4 , one of the A t where t { 1 , 2 } must contain at least two elements. Thus, d is even. If both A 1 and A 2 are nonempty, then there is a 1 s k 1 such that s A 1 and s + 1 A 2 . Now, d = T s + 1 T s = 2 b j 2 ( 2 a j 1 1 ) = 2 ( b j 2 a j 1 ) + 1 is odd, a contradiction. Hence, A t 0 for at most one t 0 { 1 , 2 } . If A 1 , then by Lemma 1, P 1 contains a k-term arithmetic progression, a contradiction. Similarly, if A 2 , then P 2 contains a k-term arithmetic progression. Hence, P avoids k-term arithmetic progressions, but contains a ( k 1 ) -term arithmetic progression. □

Author Contributions

Conceptualization, K.A.S. and K.B.W.; writing—original draft preparation, K.A.S. and K.B.W.; writing—review and editing, K.A.S. and K.B.W.; funding acquisition, K.A.S. and K.B.W. All authors read and agreed to the published version of the manuscript.

Funding

This research was funded by the Fundamental Research Grant Scheme (FRGS) Grant Number FRGS/1/2020/STG06/SYUC/03/1 by Malaysia Ministry of Higher Education and Publication Support Scheme by Sunway University, Malaysia.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Not applicable.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Davis, J.A.; Entringer, R.C.; Graham, R.L.; Simmons, G.J. On permutations contains no long arithmetic progressions. Acta Arith. 1977, 34, 81–90. [Google Scholar] [CrossRef]
  2. Sidorenko, A.F. An infinite permutation without arithmetic progressions. Discret. Math. 1988, 69, 211. [Google Scholar] [CrossRef] [Green Version]
  3. Geneson, J. Forbidden arithmetic progressions in permutations of subsets of the integers. Discret. Math. 2019, 342, 1489–1491. [Google Scholar] [CrossRef] [Green Version]
  4. Landman, B.; Robertson, A. Ramsey Theory on the Integers, 2nd ed.; American Mathematical Society: Providence, RI, USA, 2015. [Google Scholar]
  5. LeSaulnier, T.D.; Vijay, S. On permutations avoiding arithmetic progressions. Discret. Math. 2011, 311, 205–207. [Google Scholar] [CrossRef] [Green Version]
  6. Sharma, A. Enumerating permutations that avoid three term arithmetic progressions. Electron. J. Comb. 2009, 16, #R63. [Google Scholar] [CrossRef] [Green Version]
  7. Correll, B., Jr.; Ho, R.W. A note on 3-free permutations. Integers 2017, 17, #A55. [Google Scholar]
  8. Bachet, C.-G. Problèmes Plaisants & Délectables Qui se Font par les Nombres; Gauthier-Villars: Paris, France, 1884. [Google Scholar]
Figure 1. A 3 × 3 square.
Figure 1. A 3 × 3 square.
Mathematics 09 02259 g001
Figure 2. A 5 × 5 square.
Figure 2. A 5 × 5 square.
Mathematics 09 02259 g002
Figure 3. A 3 × 3 magic square.
Figure 3. A 3 × 3 magic square.
Mathematics 09 02259 g003
Figure 4. A 5 × 5 magic square.
Figure 4. A 5 × 5 magic square.
Mathematics 09 02259 g004
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Sim, K.A.; Wong, K.B. Magic Square and Arrangement of Consecutive Integers That Avoids k-Term Arithmetic Progressions. Mathematics 2021, 9, 2259. https://doi.org/10.3390/math9182259

AMA Style

Sim KA, Wong KB. Magic Square and Arrangement of Consecutive Integers That Avoids k-Term Arithmetic Progressions. Mathematics. 2021; 9(18):2259. https://doi.org/10.3390/math9182259

Chicago/Turabian Style

Sim, Kai An, and Kok Bin Wong. 2021. "Magic Square and Arrangement of Consecutive Integers That Avoids k-Term Arithmetic Progressions" Mathematics 9, no. 18: 2259. https://doi.org/10.3390/math9182259

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop