MathDB
2015 Taiwan TST Round 3 Quiz 2 Problem 2

Source: 2015 Taiwan TST Round 3 Quiz 2 Problem 2

July 12, 2015
Taiwannumber theoryTaiwan TST 2015

Problem Statement

Consider the permutation of 1,2,...,n1,2,...,n, which we denote as {a1,a2,...,an}\{a_1,a_2,...,a_n\}. Let f(n)f(n) be the number of these permutations satisfying the following conditions: (1)a1=1a_1=1 (2)aiai12,i=1,2,...,n1|a_i-a_{i-1}|\le2, i=1,2,...,n-1 what is the residue when we divide f(2015)f(2015) by 44 ?