login
A227195
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
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, 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, 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
OFFSET
2,6
COMMENTS
A112050 interleaved with A000012.
LINKS
FORMULA
a(n) = A227196(n)-1 for all n >= 2.
PROG
(PARI) A227195(n) = for(k=2, n, if(kronecker(k, n)<1, return(k-1))); \\ Antti Karttunen, Nov 08 2018
CROSSREFS
Bisections: A112050 (for odd terms from 3 onward), A000012 (for all even terms).
Sequence in context: A373387 A309913 A317905 * A111620 A111628 A161974
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jul 06 2013
EXTENSIONS
Data section extended up to a(105) by Antti Karttunen, Nov 08 2018
STATUS
approved