> scala> (1 to 1000).filter(kronSum(_) < 0) > res4: IndexedSeq[Int] = Vector(67, 99, 115, 147, 163, 169, 187, 256, 267, Did you notice A071958? For example 169 is missing there. Numbers n such that sum( i=1, n, K(n,i) ) < 0 where K(x,y) is the Kronecker symbol (x/y). Peter