Let numbers $n$ and $k$ such that $k \leq n$ be given.
Let $S$ be the set of prime numbers less than or equal to $k$.
We define a binary vector $v_{p, r}$ of length $n$ for each $p \in S$ and $r \in [p - 1] \cup \{0\}$ as follows.
For each $i \in [n-1] \cup \{0\}$:
- $(v_{p, r})_i = 1$ if $i \equiv r \; mod \; p$
- $(v_{p, r})_i = 0$ otherwise
Consider the set of all such binary vectors $X := \{ \; v_{p, r} \; | \; p \in S \text{ and } r \in [p - 1] \cup \{0\} \; \}$.
Question 1: Is $X$ linearly independent over $\mathbb{R}^{n}$? (No. See answer by @ChrisCulter)
Further, consider the vector space $V := span(X)$ such that $V$ is viewed as a subspace of $\mathbb{R}^{n}$.
I am trying to find bounds on $dim(V)$ in terms of $n$ and $k$. Any bounds would be greatly appreciated, but I am specifically trying to answer the following.
Question 2: What is the smallest $k$ (in terms of $n$) such that $dim(V) = n$? Can we always pick $k$ large enough to guarantee that $dim(V) = n$?
Update
Based on @GerryMyerson's suggestion, I coded up some examples in Octave.
When $n = 400$ and $k = 61$, we have $dim(V) = n = 400$.
This suggests that we might be able to find an upper bound on the smallest $k$ (relative to $n$) such that $dim(V) = n$.
Here is my Octave code in case anyone wants to give it a try:
% Parameters
n = 400
k = 61
% Prime numbers
primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113];
primes = primes(find(primes <= k));
% Compute number of rows & cols
count = 0;
for p = primes
count += p;
end
rows = count
cols = n
% Construct matrix
M = zeros(rows, cols);
count = 1;
for p = primes
for r = 0:(p-1)
for c = 1:cols
if r == mod(c, p)
M(count, c) = 1;
end
end
count += 1;
end
end
% Print rank
rankOfM = rank(M)