Title: Optimal bounds for Büchi's problem in modular arithmetic
Abstract: We study the second order analogue of the problem of finding optimal lower and upper bounds for the length of sequences of squares in arithmetic progression modulo a prime, and some connections with the computational problem of finding a quadratic non-residue modulo a prime. More precisely, we work modulo an integer and our objects of study are those sequences of squares whose the second difference is an invertible constant. The main results of our work is a number of exact formulae that allow to reduce the problem to prime moduli. We also observe several phenomena which are supported by extensive numerical computations.