login
Generalized Collatz sequences: coefficients resulting in a cycle containing 1.
0

%I #39 Aug 12 2024 13:39:37

%S 3,5,7,25,29,41

%N Generalized Collatz sequences: coefficients resulting in a cycle containing 1.

%C For each integer coefficient C >= 3, check the generalized Collatz sequence of each integer N > 1 defined by c(1) = N, c(n+1) = c(n) * C + 1 if F > C, otherwise c(n+1) = c(n) / F, where F is the smallest factor of c(n). If all integers reduce to 1, C belongs in the sequence.

%C A058047 is the primes in this sequence, as proposed by Zhongfu and Shiming; this sequence extends to consider composite C.

%C All terms are as yet only conjectures. Link includes github of code implementing CPU and GPU tests of these coefficients. Tests include reductions of integers up to 10^7 and random integers of size 2^2048.

%H J. C. Lagarias <a href="https://arxiv.org/pdf/math/0309224">The 3x + 1 Problem: An Annotated Bibliography, Source #195 (1963-1999), p. 73</a>.

%H J. C. Lagarias <a href="https://arxiv.org/pdf/math/0608208">The 3x + 1 Problem: An Annotated Bibliography, II (2000-2009)</a>.

%H John Laky, <a href="https://github.com/opticaliqlusion/collatz">Python Collatz tests</a>.

%e The first term in the sequence, 3, is the normal Collatz formula C_3 is defined as:

%e n / 2 if n is congruent to 0 mod 2,

%e otherwise, 3*n+1.

%e Note that 3 is the first element of this sequence iff the Collatz Conjecture is true.

%e The next term, 5, creates C_5 is defined as:

%e n / 2 if n is congruent to 0 mod 2,

%e n / 3 if n is congruent to 0 mod 3,

%e otherwise, 5*n+1.

%e However, the coefficient 11 is not in this sequence, as it creates the formula C_11:

%e n / 2 if n is congruent to 0 mod 2,

%e n / 3 if n is congruent to 0 mod 3,

%e n / 5 if n is congruent to 0 mod 5,

%e n / 7 if n is congruent to 0 mod 7,

%e otherwise, 11*n+1.

%e C_11 creates a nontrivial loop 188, 518, 408, 188. The loop is nontrivial because it does not contain 1. Thus, 11 does not belong in the sequence.

%o (Python)

%o import sympy

%o BIT_LIMIT = 100000

%o MAX_TESTS = 10000000

%o def _reduce(c,n):

%o seen = []

%o while n != 1:

%o for p in sympy.sieve.primerange(c):

%o while n % p == 0: n = n // p

%o if n==1: break

%o n = c*n+1

%o if n.bit_length() > BIT_LIMIT or n in seen: break

%o seen.append(n)

%o return n

%o def is_A374670(c):

%o for i in range(1, MAX_TESTS):

%o if _reduce(c, i) != 1: return False

%o return True

%Y Cf. A058047.

%K nonn,more

%O 1,1

%A _John Laky_, Jul 14 2024