cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

Original entry on oeis.org

3, 5, 7, 25, 29, 41
Offset: 1

Views

Author

John Laky, Jul 14 2024

Keywords

Comments

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.
A058047 is the primes in this sequence, as proposed by Zhongfu and Shiming; this sequence extends to consider composite 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.

Examples

			The first term in the sequence, 3, is the normal Collatz formula C_3 is defined as:
  n / 2 if n is congruent to 0 mod 2,
  otherwise, 3*n+1.
Note that 3 is the first element of this sequence iff the Collatz Conjecture is true.
The next term, 5, creates C_5 is defined as:
  n / 2 if n is congruent to 0 mod 2,
  n / 3 if n is congruent to 0 mod 3,
  otherwise, 5*n+1.
However, the coefficient 11 is not in this sequence, as it creates the formula C_11:
  n / 2 if n is congruent to 0 mod 2,
  n / 3 if n is congruent to 0 mod 3,
  n / 5 if n is congruent to 0 mod 5,
  n / 7 if n is congruent to 0 mod 7,
  otherwise, 11*n+1.
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.
		

Crossrefs

Cf. A058047.

Programs

  • Python
    import sympy
    BIT_LIMIT = 100000
    MAX_TESTS = 10000000
    def _reduce(c,n):
        seen = []
        while n != 1:
            for p in sympy.sieve.primerange(c):
                while n % p == 0: n = n // p
            if n==1: break
            n = c*n+1
            if n.bit_length() > BIT_LIMIT or n in seen: break
            seen.append(n)
        return n
    def is_A374670(c):
        for i in range(1, MAX_TESTS):
            if _reduce(c, i) != 1: return False
        return True