A354597 a(n) is the smallest number k>0 such that -n is not a quadratic residue modulo k.
3, 4, 5, 3, 4, 4, 3, 5, 4, 3, 7, 5, 3, 4, 7, 3, 4, 4, 3, 11, 4, 3, 5, 9, 3, 4, 5, 3, 4, 4, 3, 5, 4, 3, 8, 7, 3, 4, 7, 3, 4, 4, 3, 7, 4, 3, 5, 5, 3, 4, 7, 3, 4, 4, 3, 11, 4, 3, 8, 7, 3, 4, 5, 3, 4, 4, 3, 5, 4, 3, 7, 5, 3, 4, 8, 3, 4, 4, 3, 11, 4, 3, 5, 9, 3, 4, 5, 3, 4, 4, 3, 5, 4, 3, 7, 9, 3, 4, 7, 3
Offset: 1
Keywords
Crossrefs
Cf. A139401.
Programs
-
PARI
a(n) = my(k=2); while (issquare(Mod(-n, k)), k++); k; \\ Michel Marcus, Jul 08 2022
Comments