# Congruences mod p#

Maybe the following can be done by induction or maybe there is some group-theoretical approach that I am unlikely to see. Thanks for any hints or thoughts.

$$(\cdot)$$ is an exclusive interval. Let $$p\#$$ be the product of primes not exceeding $$p.$$ Let $$q=p\#-p^2.$$

Claim. There is always an integer $$n$$ in $$(1,2p)$$ such that $$n\not\equiv q$$ mod $$(2,3,...,p).$$

To be clear, $$n$$ cannot have the same congruence as q mod any prime $$\leq p.$$ I am not sure what the term for that is and have been thinking of it as "co-mod" (comod). For example, 6 and 11 are coprime but both are congruent to 1 mod 5 hence not comod.

Example. Let $$p=5.$$ Then $$q=(2\cdot3\cdot5)-5^2=5.$$ Now $$5\equiv (1,2,0)~$$(mod $$2,3,5).$$ Because 5 is on the interval $$(1,10)$$ it is easy to check that $$(5\pm1)$$ both satisfy the requirement: $$4\equiv (0,1,4)$$ and $$6\equiv (0,0,1)$$ (mod $$2,3,5)$$ and both are $$\not\equiv 5$$ mod $$2,3,$$ or $$5.$$

Induction seemed like an approach that might work. In general we have a $$q = (1,2,a,b,c,...,0)$$ (mod $$2,3,5,7,11,...,p$$). Starting with 5 on the inteval $$(1, 2p)$$ we can imagine for small numbers how the position of $$a,b,c,...$$ can prevent non-congruence. For larger numbers the unknown quantities can begin to interact and so this seems obscure.

Group theory? There are probably group theoretical properties of comods that are beyond me. For example, coprimes to $$5\#$$ on $$[1,5\#)$$ seem to be a special case of comods in the sense that the comods to any number on $$[1,30]$$ give a partition of this interval into non-disjoint classes of 8 members, the comods/coprimes to 30 being the usual $$(1,7,11,13,17,19,23,29).$$ It also seems true that there are 8 natural groupings of these classes:(30,1), (2-7), (8-11), (12,13), (14-17),(18,19), (20-23), (24-29) but this is only meant as an indication of what I have looked at (without success).

• not going to bump this--just to correct: there are 30 nondisjoint partitions and they do not form "natural groupings". this was an artifact of my listing. – daniel Jan 13 at 8:41

This is equivalent to asking if there is always $$m=n+p^2$$ between $$p^2$$ and $$(p+1)^2$$ with $$m \equiv n+p^2 \not \equiv q+p^2 \equiv p\# \equiv 0 \pmod{2,3,...,p}$$ i.e. if there is always a prime $$m=n+p^2$$ between $$p^2$$ and $$(p+1)^2$$, which is Legendre’s conjecture restricted to the primes. Seems true, but probably an open problem.