This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A373088 #9 May 31 2024 14:24:26 %S A373088 0,0,3,2,0,2,7,5,3,0,7,2,5,2,3,13,0,3,5,2,3,2,5,3,7,0,3,2,5,2,11,7,3, %T A373088 5,7,2,0,2,3,11,7,3,5,2,3,2,11,3,5,0,3,2,5,2,7,7,3,5,5,2,13,2,3,5,0,3, %U A373088 7,2,3,2,13,3,5,5,3,2,7,2,5,11,3,0,5,2 %N A373088 a(n) = min{k : KroneckerSymbol(n, k) = -1} if n is not a square, 0 otherwise. %F A373088 If n is not a square then a(n) is a prime number. %p A373088 K := (n, k) -> NumberTheory:-KroneckerSymbol(n, k): %p A373088 a := proc(n) if issqr(n) then return 0 fi; %p A373088 local k; k := 0; %p A373088 while true do %p A373088 if K(n, k) = -1 then return k fi; %p A373088 k := k + 1; %p A373088 od; -1; end: %p A373088 seq(a(n), n = 0..83); %o A373088 (SageMath) %o A373088 def A373088(n): %o A373088 if is_square(n): return 0 %o A373088 k = 0 %o A373088 while True: %o A373088 if kronecker_symbol(n, k) == -1: %o A373088 return k %o A373088 k += 1 %o A373088 return k %o A373088 print([A373088(n) for n in range(83)]) %o A373088 (PARI) a(n) = if (issquare(n), 0, my(k=1); while (kronecker(n,k) != -1, k++); k); \\ _Michel Marcus_, May 31 2024 %Y A373088 Similar: A092419, A144294. %Y A373088 Cf. A372728. %K A373088 nonn %O A373088 0,3 %A A373088 _Peter Luschny_, May 26 2024