This question is connected with another one found in the following link: Collatz conjecture generalization
Consider the following algorithm:
For a given prime $p$, take any integer and, if it is divisible by any prime smaller than $p$, then it should be divided by such prime until it is no longer divisible by it. If it is not divisible by any prime smaller than $p$, then it should be multiplied by $p$ and added to $1$. It's easy to see that the algorithm in the Collatz conjecture is the above algorithm with $p=3$.
In the question mentioned above, I had proposed that, for any prime, any given integer would be taken to $1$ eventually by the above algorithm. For $p=3$, that's the Collatz conjecture. I was corrected by the example of $p=13$ and $n=19$, as is demonstrated in the that question.
As I studied this and similar failures, I arrived at the following exceptions: $$(p=11,n=17),(13,19),(17,43),(19,46063),(23,179),(31,67),(43,174569),(47,859)$$ I have not found an exception for the following primes, besides $3$, obviously: $5, 7, 29, 41$. This may be due to the fact that I have searched only numbers smaller than $10000p$, where $p$ is the prime researched.
I would like to ask for help to try and find exceptions to the following proposition, particularly when applied to the primes above paired to their exception:
Given any prime $p$ different than 2, there is only one another prime that, if added to the set of primes smaller than $p$, will compose a set whose division will take any integer to $1$ in the context of the above generalized algorithm.
I have used the algorithm in Python below to test my hypothesis.
def isPrime(n):
j=2
while j<n:
if n%j==0:
return False
else:
j+=1
return True
def prime(n):
i=2
j=1
if n==1:
return i
else:
while isPrime(i)==False or j<n:
i+=1
if isPrime(i)==True:
j+=1
return i
def smallerPrime(p):
if isPrime(p)==False:
return print("this function only acctepts primes")
p-=2
while isPrime(p)==False:
p-=2
return p
def PnTest(x,p):
v=[]
u=[]
i=p
LoopFound=False
FirstLoop=True
while i>3:
i=smallerPrime(i)
u.append(i)
u.append(2)
while x!=1:
for j in u:
while x%j==0:
x=x//j
v.append(x)
if x!=1:
x=p*x+1
for j in v:
if j==x:
print("loop found\n")
for k in v:
print(k)
LoopFound=True
if LoopFound:
return (1)
v.append(x)
FirstLoop=False
return (0)
p1=int(input("type a prime p to test the pn+1 hypothesis for integers smaller than 1000*p\n"))
x1=10000*p1
counter1=2
counter2=0
while counter1<=x1:
counter2+=PnTest(counter1, p1)
counter1+=1
print("\n")
print(counter1)
print("integers have been tested.\n")
print(counter2)
print("cycles not reaching one have been found")
Take $p=61$.
Let's "condense" or "accelerate" the algorithm, doing $61n+1$ and then immediately removing any factors less than $61$. We have (at least) two different loops, other than $1\to1$:
$$97 \to 269 \to 547 \to 97$$ $$199 \to 607 \to 9257 \to 10457 \to 2593 \to 79087 \to 1206077 \to 199$$
After factoring $1206077=71\cdot16987$, all of the numbers involved are prime, and they're all distinct.
Now suppose one prime number is added to the list of divisors $\{2,3,\cdots,59\}$. If this causes one of the loops to change and go to $1$, then that prime must be in that loop. So both loops cannot change at the same time; at least one of them remains disconnected from $1$.