MathDB
All n which divide one of the two numbers

Source: International Zhautykov Olympiad 2013 - D1 - P2

January 17, 2013
modular arithmeticnumber theory proposednumber theory

Problem Statement

Find all odd positive integers n>1n>1 such that there is a permutation a1,a2,a3,,ana_1, a_2, a_3, \ldots, a_n of the numbers 1,2,3,,n1, 2,3, \ldots, n where nn divides one of the numbers ak2ak+11a_k^2 - a_{k+1} - 1 and ak2ak+1+1a_k^2 - a_{k+1} + 1 for each kk, 1kn1 \leq k \leq n (we assume an+1=a1a_{n+1}=a_1).