login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A373088 a(n) = min{k : KroneckerSymbol(n, k) = -1} if n is not a square, 0 otherwise. 3

%I #9 May 31 2024 14:24:26

%S 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 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 7,2,3,2,13,3,5,5,3,2,7,2,5,11,3,0,5,2

%N a(n) = min{k : KroneckerSymbol(n, k) = -1} if n is not a square, 0 otherwise.

%F If n is not a square then a(n) is a prime number.

%p K := (n, k) -> NumberTheory:-KroneckerSymbol(n, k):

%p a := proc(n) if issqr(n) then return 0 fi;

%p local k; k := 0;

%p while true do

%p if K(n, k) = -1 then return k fi;

%p k := k + 1;

%p od; -1; end:

%p seq(a(n), n = 0..83);

%o (SageMath)

%o def A373088(n):

%o if is_square(n): return 0

%o k = 0

%o while True:

%o if kronecker_symbol(n, k) == -1:

%o return k

%o k += 1

%o return k

%o print([A373088(n) for n in range(83)])

%o (PARI) a(n) = if (issquare(n), 0, my(k=1); while (kronecker(n,k) != -1, k++); k); \\ _Michel Marcus_, May 31 2024

%Y Similar: A092419, A144294.

%Y Cf. A372728.

%K nonn

%O 0,3

%A _Peter Luschny_, May 26 2024

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 29 21:21 EDT 2024. Contains 374734 sequences. (Running on oeis4.)