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.

This page as a plain text file.
%I A374670 #43 May 28 2025 11:14:16
%S A374670 3,5,7,25,29,41
%N A374670 Generalized Collatz sequences: coefficients resulting in a cycle containing 1.
%C A374670 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 A374670 A058047 is the primes in this sequence, as proposed by Zhongfu and Shiming; this sequence extends to consider composite C.
%C A374670 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 A374670 J. C. Lagarias, <a href="https://arxiv.org/abs/math/0309224">The 3x + 1 Problem: An Annotated Bibliography, Source #195 (1963-1999), p. 73</a>, arXiv:math/0309224 [math.NT], 2003-2011.
%H A374670 J. C. Lagarias, <a href="https://arxiv.org/abs/math/0608208">The 3x + 1 Problem: An Annotated Bibliography, II (2000-2009)</a>, arXiv:math/0608208 [math.NT], 2006-2012.
%H A374670 John Laky, <a href="https://github.com/opticaliqlusion/collatz">Python Collatz tests</a>.
%e A374670 The first term in the sequence, 3, is the normal Collatz formula C_3 is defined as:
%e A374670   n / 2 if n is congruent to 0 mod 2,
%e A374670   otherwise, 3*n+1.
%e A374670 Note that 3 is the first element of this sequence iff the Collatz Conjecture is true.
%e A374670 The next term, 5, creates C_5 is defined as:
%e A374670   n / 2 if n is congruent to 0 mod 2,
%e A374670   n / 3 if n is congruent to 0 mod 3,
%e A374670   otherwise, 5*n+1.
%e A374670 However, the coefficient 11 is not in this sequence, as it creates the formula C_11:
%e A374670   n / 2 if n is congruent to 0 mod 2,
%e A374670   n / 3 if n is congruent to 0 mod 3,
%e A374670   n / 5 if n is congruent to 0 mod 5,
%e A374670   n / 7 if n is congruent to 0 mod 7,
%e A374670   otherwise, 11*n+1.
%e A374670 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 A374670 (Python)
%o A374670 import sympy
%o A374670 BIT_LIMIT = 100000
%o A374670 MAX_TESTS = 10000000
%o A374670 def _reduce(c,n):
%o A374670     seen = []
%o A374670     while n != 1:
%o A374670         for p in sympy.sieve.primerange(c):
%o A374670             while n % p == 0: n = n // p
%o A374670         if n==1: break
%o A374670         n = c*n+1
%o A374670         if n.bit_length() > BIT_LIMIT or n in seen: break
%o A374670         seen.append(n)
%o A374670     return n
%o A374670 def is_A374670(c):
%o A374670     for i in range(1, MAX_TESTS):
%o A374670         if _reduce(c, i) != 1: return False
%o A374670     return True
%Y A374670 Cf. A058047.
%K A374670 nonn,more
%O A374670 1,1
%A A374670 _John Laky_, Jul 14 2024