A227194 Natural numbers for which all sums Sum_{i=1..u} K(i/n) (with u ranging from 1 to n) are nonnegative, where K(i/n) is Kronecker symbol of i and n.
1, 2, 3, 4, 6, 7, 9, 10, 11, 12, 14, 15, 16, 23, 24, 25, 26, 27, 30, 31, 34, 35, 36, 38, 39, 42, 44, 47, 48, 49, 54, 55, 56, 58, 59, 62, 63, 64, 66, 71, 74, 75, 76, 79, 81, 82, 83, 86, 87, 94, 95, 96, 100, 103, 106, 108, 110, 111, 114, 119, 120, 121, 130, 131
Offset: 1
Keywords
Programs
-
PARI
firstdiving(n) = {s=0;for(k=1,n,s=s+kronecker(k,n);if(s<0,return(k)));return(0)} for(n=1,500,if((0==firstdiving(n)),print1(n,", ")))