On Factors, Modular sums and Cumulative sums

45 Views Asked by At

Let $n \in \mathbb{Z}$. We compute for $k \ge 2$,

$$ s_k \equiv {n(n+1) \over 2} \bmod{k} \tag 1 $$

$$ c_{k} = c_{k-1} + s_k \tag 2 $$

The RHS in Eqn. (1) can be readily recognized as the sum of first $n$ natural numbers, modulo $k$.

Eqn. (2) computes the ordinary cumulative sum of the modular sums $s_k$.

There seems to be a pattern where a factor of $n$ can be detected:

  1. at an even step $k$.
  2. $k$ is smaller than the smallest factor of $n$.

Is this a known phenomena? Can we say anything about the number of steps $k$ in which we can detect a factor?

Here are a few examples:

Table for $8017 \times 31$: Table for 8017 x 31

Table for $103 \times 257$: Table for 8017 x 31

Table for $307 \times 439$ Table for 307 x 439