OFFSET
1,1
COMMENTS
Note that {Kronecker(D,i)} is a Dirichlet character mod |D| if and only if D == 0, 1 (mod 4).
Primitive terms in A329306.
Numbers of the form d*p^2, where -d is a fundamental discriminant and Kronecker(-d,p) = 1 (i.e., the rational prime p decomposes in the quadratic number field with discriminant -d).
EXAMPLE
60 is a term because 60 = 2^2 * 15 and -15 is a fundamental discriminant. Indeed, -Sum_{i=1..60} Kronecker(-60,i)*i = 0 and -Sum_{i=1..15} Kronecker(-15,i)*i != 0.
Although -Sum_{i=1..252} Kronecker(-252,i)*i = 0, 252 is not a term, because 252/3^2 = 28 and -Sum_{i=1..28} Kronecker(-28,i)*i = 0
PROG
(PARI) isA329307(n) = if(n%4==0||n%4==3, my(f=factor(n)); for(i=1, omega(n), my(p=f[i, 1], e=f[i, 2], m=n/p^e); if(e==2 && isfundamental(-m) && kronecker(-m, p)==1, return(1)))); 0
CROSSREFS
KEYWORD
nonn
AUTHOR
Jianing Song, Nov 30 2019
STATUS
approved