cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

Original entry on oeis.org

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, 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, 0, 2, 2, 0, 2, 1, 1, 1, 1, 0, 2, 2, 1, 0, 2, 0, 1, 0
Offset: 1

Views

Author

Gevorg Hmayakyan, Nov 26 2020

Keywords

Comments

Conjecture: a(p) = 2 for prime p > 5. Tested for p up to 100000.
From Sebastian Karlsson, Dec 12 2020: (Start)
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.
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)

Crossrefs

Cf. A010815.

Programs

  • Mathematica
    d[ n_] := With[ {m = Sqrt[24 n + 1]}, If[ IntegerQ[m], KroneckerSymbol[ 12, m], 0]];
    a[ n_] := Sum[d[n*k], {k, 0, (n + 1)/2}]
  • PARI
    f(n) = if( issquare( 24*n + 1, &n), kronecker( 12, n)); \\ A010815
    a(n) = sum(k=0, (n+1)/2, f(n*k)); \\ Michel Marcus, Nov 27 2020