0

This post was inspired by the following one.
Fast way to check if two integers don't have any prime factors in common

We consider the sequence of numbers of equal $(p+q)$ for a number $N=pq$. We consider only odd composite numbers. We consider the example of $N=5*7=35=1*35$. The sequence of numbers of equal $(p+q)=1+35=36$ is given by $$35,68,99,128,155,180,203,224,243,260,275,288,299,308,315,320,323,324$$

There is another sequence of numbers of equal $(p+q)=5+7$ for $N=35$ but in this case we do not know the other numbers with the same $(p+q)$ unless we factor $N=35$. So we do not consider this sequence.

In the first sequence given above, we know that there are numbers with a common factor with $N=35$ every time we hit a multiple of $5$ or $7$. To find them, we need to take the $GCD$ of $N$ and those numbers with a common factor. Because we don't know which number has a common factor with $N$, we need to take the $GCD$ with $N=35$ of every number. This method cannot be efficient. However, I noticed that there are numbers with a common factor with $N$ but also with the same sum of digits ($SD=8$). For the example above these numbers are given by $$224,260,323$$

So we only need to check $3$ numbers out of $17$. Of these $3$ numbers only $224$ and $260$ have a common factor with $N=35$.

When experimenting with the method, I always found numbers with the same sum of digits and also found at least one with a common factor.
We know that the sum of digit is periodic within the sequence of numbers with the same $(p+q)$ so we only need to calculate those numbers and check if they have a common factor with $N$.

The question is this: Can it be proven that there is always at least one number (with the same sum of digits as $N$) within the sequence with a common factor with $N$?

user25406
  • 1,124
  • 1
  • 10
  • 17
  • What does "sequence of numbers of equal $(+)$ for a number $=$ " mean? – lulu Sep 13 '19 at 20:12
  • @lulu, we take $N=35$ but we consider the following decomposition $N=135$ not $N=57$. So $p+q=1+35=36$. All the numbers of the sequence have $p+q=36$. And the way they are calculated is this: $35=18^2-17^2$, $64=18^2-16^2$...until the last one $324=18^2-0^2$. – user25406 Sep 13 '19 at 20:17
  • 1
    @lulu Based on their example, I take it to mean this: Pick a number $N$ and a particular factorization $N=pq$. Then the sequence in question consists of all numbers $M$ such that there exist integers $r$ and $s$ with $M=rs$ and $r+s=p+q$. – kccu Sep 13 '19 at 20:18
  • 1
    @lulu Apparently, that's the sequence $N, 2(N-1), 3(N-2),\ldots, (k+1)(N-k),\ldots $. Then $\gcd(N,(k+1)(N-k))=\gcd(N,k^2+k)$ might reveal a factorization of $N$ for some $k$ – Hagen von Eitzen Sep 13 '19 at 20:18
  • @HagenvonEitzen et. al. Ah, thank you. I had assumed $p,q$ were primes...hence $5,7$ given that they multiply to give $35$. – lulu Sep 13 '19 at 20:22
  • @kccu, the numbers with the same $(p+q)$ are calculated the following way: $135, 234,333,432$...so for example $224=828$ with $8+28=36$ but also $224=732$ with $7$ a common factor. – user25406 Sep 13 '19 at 20:30
  • 1
    We want $k(N+1-k)\equiv N\bmod9$ and $\gcd(k(N+1-k),N)>1$. Or, $kN-N+k-k^2=(N-k)(k-1)\equiv0\bmod9$ and $\gcd(k(k-1),N)>1$. – Gerry Myerson Sep 14 '19 at 00:22
  • @GerryMyerson, suppose we start with a prime $p$ and we go thru the process of calculating the gcd of $p$ and numbers of the sequence with the same sum of digits. We know in this case we will not get a $gcd>1$. Doesn't this mean that if we were to start with a composite number $N$, we will always find a number with the same sum of digits in the sequence that has a common factor with $N$ because if we didn't it would mean that $N$ is prime? – user25406 Sep 26 '19 at 21:12
  • @HagenvonEitzen, suppose we start with a prime p and we go thru the process of calculating the gcd of p and numbers of the sequence with the same sum of digits. We know in this case we will not get a gcd>1. Doesn't this mean that if we were to start with a composite number N, we will always find a number with the same sum of digits in the sequence that has a common factor with N because if we didn't it would mean that N is prime? – user25406 Oct 02 '19 at 13:41

0 Answers0