login
a(n) = one less than the first i >= 1 for which the Kronecker symbol K(i,n) is either 0 or -1. Or the maximal value u such that all K(1,n), K(2,n), ... up to K(u,n) have +1 as their values.
2

%I #14 Nov 08 2018 21:13:03

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

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

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

%N a(n) = one less than the first i >= 1 for which the Kronecker symbol K(i,n) is either 0 or -1. Or the maximal value u such that all K(1,n), K(2,n), ... up to K(u,n) have +1 as their values.

%C A112050 interleaved with A000012.

%H Antti Karttunen, <a href="/A227195/b227195.txt">Table of n, a(n) for n = 2..10000</a>

%F a(n) = A227196(n)-1 for all n >= 2.

%o (PARI) A227195(n) = for(k=2, n, if(kronecker(k, n)<1, return(k-1))); \\ _Antti Karttunen_, Nov 08 2018

%Y Bisections: A112050 (for odd terms from 3 onward), A000012 (for all even terms).

%K nonn

%O 2,6

%A _Antti Karttunen_, Jul 06 2013

%E Data section extended up to a(105) by _Antti Karttunen_, Nov 08 2018