login
a(n) = Sum_{k=0..(n+1)/2} A010815(n*k).
0

%I #31 Dec 25 2020 12:45:15

%S 0,0,1,1,1,0,2,1,1,0,2,0,2,0,0,1,2,0,2,1,1,1,2,1,2,1,1,2,2,1,2,1,1,0,

%T 0,1,2,0,0,0,2,0,2,0,2,1,2,0,2,1,2,0,2,0,2,1,2,0,2,0,2,0,0,1,1,-1,2,1,

%U 0,2,2,0,2,1,1,1,1,0,2,2,1,0,2,0,1,0

%N a(n) = Sum_{k=0..(n+1)/2} A010815(n*k).

%C Conjecture: a(p) = 2 for prime p > 5. Tested for p up to 100000.

%C From _Sebastian Karlsson_, Dec 12 2020: (Start)

%C Proof: The terms of the sum are A010815(n*k) = (-1)^m if n*k = m*(3*m+-1)/2, 0 otherwise. If n*k = m*(3*m+-1)/2 and n is a prime p, then p (>2) divides either m or 3*m+-1. If p divides m, then either m = 0 or p <= m and p < p+1 < 3*m+-1. For m = 0 we get the term (-1)^0 = 1. If m is not 0, then p*k <= p*(p+1)/2 < m*(3*m+-1)/2, so p*k cannot be expressed as m*(3*m+-1)/2.

%C On the contrary, if p divides 3*m+-1, let 3*m+-1 = q*p were q is an integer. We get: m*(3*m+-1)/2 = q*p*(q*p+-1)/6. If p > 5 and q >= 2 then q*p*(q*p+-1)/6 >= 2*p*(2*p+-1)/6 > p*(p+1)/2 >= p*k. Thus, p*k cannot be expressed as m*(3*m+-1)/2. If q = 1, i.e., if p = 3*m+-1, then m*(3*m+-1)/2 = p*(p+-1)/6. Thus, for k = (p+-1)/6 (which always is an integer if p >= 5) we get the only term (except for when k = 0) for which A010815(p*k) is not 0. When k = (p+-1)/6, m = (p+-1)/3 and hence A010815(p*k) = 1 (since (p+-1)/3 is even if p > 2). This shows that a(p) = 1+0+...+0+1+0+...+0 = 2. (End)

%t d[ n_] := With[ {m = Sqrt[24 n + 1]}, If[ IntegerQ[m], KroneckerSymbol[ 12, m], 0]];

%t a[ n_] := Sum[d[n*k], {k, 0, (n + 1)/2}]

%o (PARI) f(n) = if( issquare( 24*n + 1, &n), kronecker( 12, n)); \\ A010815

%o a(n) = sum(k=0, (n+1)/2, f(n*k)); \\ _Michel Marcus_, Nov 27 2020

%Y Cf. A010815.

%K sign

%O 1,7

%A _Gevorg Hmayakyan_, Nov 26 2020