%I #6 Sep 11 2024 23:01:22
%S 2,2,2,2,2,16,2,2,2,6,2,8,6,2,2,2,2,2,2,8,2,2,8,32,2,2,2,54,16,18,2,8,
%T 2,2,50,6,2,2,2,2,2,2,64,2,2,2,6,2,6,8,2,80,250,256,2,2,2,6,8,6,2,18,
%U 2,8,2,22,16,2,2,32,2,2,2,2,2,2,18,16,8,2,2,10,432,6,2,64,24,2,2,2,2,2,2,6,2,2,8,2,2,2,2,2,8,10,64,2,16,2,24,2,2,8,2,14,640,6
%N a(n) is the smallest distance between a pair of equal terms in the sequence s(0) = 1, s(1) = r, and s(k) = s(k-1)^2/(4*s(k-2)) mod p for k>=2, where p = prime(n) (=A000040(n)) and r is a primitive root modulo p.
%C a(n) does not depend on the choice of a primitive root r modulo prime(n).
%C a(n) = prime(n) - 1 iff prime(n) is in A376008.
%C a(n) = 2 iff prime(n) is in A216371.
%C a(n) > 2 iff prime(n) is in A268923.
%Y Cf. A216371, A268923, A376008.
%K nonn
%O 2,1
%A _Max Alekseyev_, Sep 05 2024