Collatz conjecture generalization's further discussion

290 Views Asked by At

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")
2

There are 2 best solutions below

0
On BEST ANSWER

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$.

0
On

Just to show more "exceptions" (=cycles). Using Pari/GP I could go up to $p=101$ and even test Mersenne-primes $p=2^7-1$,$p=2^{13}-1$,$p=2^{17}-1$ going up to $n<=1\,000\,000$. Here are some results:

\\ selecting     \\
\\ a basic prime \\ 
\\ "pp"        \\  found cycles  in positive or negative integers |n|<1 000 000
initp(11)      \\ (17,47,37),(-13,-71),(-17,-31)
initp(13)      \\ (19,31,101,73),(-19,-41),(-9959,..),(-99503,...)
initp(17)      \\ (43,61,...),(-29,-41)
initp(61)      \\ 
  \\    97:  269 547 97 ... 
  \\   199:  607 9257 10457 2593 79087 1206077 199 ... 
  \\ 26833:  818407 290249 590173 947383 14447591  26833 ... 
initp(83) \\ 
  \\ 89:  1847 76651 151477 261929 418079 17350279 240012193 135131 5607937 38788231
  \\   16259713 110801 19001 394271 1487477 7716287 320225911 340753213 522589 35437
  \\   89  
  \\ 4049:  84017 1743353 76157 790129 5465059 75599983 9093911 53913901 62150747 368465143 339806743
  \\        49480631 6867713 28501009 17921089 5389313 604477 2090483 70247 47791 661109
  \\    4049 

initp(101) \\ 
  \\ 661:  3709 12487 661

from here pp = some Mersenne-primes

initp(2^5-1) \\ 
  \\ 67:  1039 3221 8321 2687 13883  10247 4813 3391 52561 101837 29231 151027 334417
  \\      197 509 263 151 2341 18143 93739 41513 1849 1433 617 797 71 367 5689 4409
  \\      67 ...
  \\ -37:  -191 -37
  \\ -41:  -127 -41

initp(2^7-1) \\ 
  \\  (none found in positive integers < 1 000 000)
  \\ -131:  -4159 -131
  \\ -139:  -1471 -139 
  \\ -191:  -379 -191
  \\ -239:  -271 -239

initp(2^13-1) \\ 
 \\  118583:  4905623 6696992999 2148651377 122219468257 1646545500811 4156807 17024203069 2045251501 12729981037 26067818668517 114150635177 3911904863 4513513 1782211 155298833 4379623 118583... 
 \\    -15359    -17551  -15359
 \\    -12799    -22751  -12799
 \\    -12671    -23167  -12671
 \\    -11519    -28351  -11519
 \\     -9343    -66431   -9343
 \\     -9151    -78079   -9151
 \\     -8971    -94207   -8971
 \\     -8831   -113023   -8831
 \\     -8737   -131071   -8737
 \\     -8447   -270271   -8447
 \\     -8287   -707071   -8287
 \\     -8263   -940031   -8263
 \\     -8233  -1605631   -8233
 \\     -8231  -1685503   -8231

initp(2^17-1) \\ isprime(2^17-1)
 \\  132409, 4472933, 59507897, 2074903, 5912165459, 1305137, 1069267, 132409, ...
 \\ -136511 -3289087 -136511
 \\ -141311 -1808767 -141311
 \\ -174761 -524287 -174761
 \\ -235927 -294911 -235927

It looks very interesting that at the mersenne-primes we have lists of 2-step-cycles where the first and the second elements show a typical pattern in their lists. (I've not yet an idea about this)
Caveat: the results occured while developing the used functions; there might be errors/missing cycles. I'll undergo rechecking all results with my newest functions/programs soon...

(If wished I can supply the Pari/GP routines)


Update A longer list can be seen here