The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A112050 Length of the longest prefix of 1's in the Jacobi-vector {J(2n+1,1),J(2n+1,2),...,J(2n+1,2n)}. 2

%I #19 May 09 2021 04:59:28

%S 1,1,2,2,1,1,2,2,1,1,4,4,1,1,2,2,1,1,2,2,1,1,4,6,1,1,2,2,1,1,2,2,1,1,

%T 6,4,1,1,2,2,1,1,2,2,1,1,4,4,1,1,2,2,1,1,2,2,1,1,6,10,1,1,2,2,1,1,2,2,

%U 1,1,4,4,1,1,2,2,1,1,2,2,1,1,4,12,1,1,2,2,1,1,2,2,1,1,6,4,1,1,2,2,1,1

%N Length of the longest prefix of 1's in the Jacobi-vector {J(2n+1,1),J(2n+1,2),...,J(2n+1,2n)}.

%F a(n) = A112046(n) - 1.

%t a112046[n_]:=Block[{i=1}, While[JacobiSymbol[i, 2n + 1]==1, i++]; i]; Table[a112046[n] - 1, {n, 102}] (* _Indranil Ghosh_, May 24 2017 *)

%o (Python)

%o from sympy import jacobi_symbol as J

%o def a112046(n):

%o i=1

%o while True:

%o if J(i, 2*n + 1)!=1: return i

%o else: i+=1

%o def a(n): return a112046(n) - 1

%o print([a(n) for n in range(1, 103)]) # _Indranil Ghosh_, May 24 2017

%Y Cf. A112046.

%K nonn

%O 1,3

%A _Antti Karttunen_, Aug 27 2005

%E Name clarified by _Joerg Arndt_, May 24 2017

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.

Last modified May 27 11:47 EDT 2024. Contains 372858 sequences. (Running on oeis4.)