OFFSET
1,1
COMMENTS
In other words, for any three consecutive residues u,v,w, the quadratic polynomial u*x^2 + v*x + w has zero discriminant modulo p.
It is shown that all suitable permutations q for prime p = a(n) can be constructed by starting with q(1) = 1, q(2) = a primitive root modulo p, and then defining q(k) = q(k-1)^2/(4*q(k-2)) mod p for k >= 3. Hence, the number of suitable permutations (up to cyclic rotations) is given by A046144(a(n)).
LINKS
Max Alekseyev, Table of n, a(n) for n = 1..100
N. Osipov et al., Residues on a circle (in Russian), dxdy.ru, 2024.
FORMULA
An odd prime p is a term iff for s:=(p-1)/A002326((p-1)/2), radicals of p-1 and 2s coincide, excluding the case p==1 (mod 4) and s==1 (mod 2).
EXAMPLE
For a(2) = 17, a suitable cyclic permutation is (1, 3, 15, 6, 4, 12, 9, 7, 16, 14, 2, 11, 13, 5, 8, 10).
PROG
(PARI) forprime(p=3, 10^8, s=(p-1)/znorder(Mod(2, p)); if(factor(p-1)[, 1]==factor(2*s)[, 1] && !(p%4==1 && s%2==1), print1(p, ", ")) );
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved