login
A376801
a(0) = 397; a(n+1) = a(n)^2 if a(n) is prime, floor(a(n)/2) otherwise.
1
397, 157609, 78804, 39402, 19701, 9850, 4925, 2462, 1231, 1515361, 757680, 378840, 189420, 94710, 47355, 23677, 560600329, 280300164, 140150082, 70075041, 35037520, 17518760, 8759380, 4379690, 2189845, 1094922, 547461, 273730, 136865, 68432, 34216, 17108, 8554
OFFSET
0,1
COMMENTS
From most starting points, this sequence trivially reaches the cycle (4,2,4,2,...). No other cycles are known to exist. Heuristic results suggest that every starting point almost surely reaches a cycle, despite the colossal size of the intermediate values. a(0) = 397 is the first starting point which is not known to reach the (4,2) cycle: heuristically, the sequence likely runs for 10^12 terms or more before hitting it.
LINKS
Matthew House, Table of n, a(n) for a(n) prime, n <= 2341068 (primes up to 10^10000 proven via ECPP)
Joseph O'Rourke et al., A Collatz-like function that bifurcates on primes, MathOverflow, 2015-2024.
Strashimir G. Popvassilev et al., Are there always at least *five* divisions?, MathOverflow, 2015.
FORMULA
If a(n) is prime and a(n) >= 13, then a(n+6) = floor(a(n)^2/32).
EXAMPLE
The first few primes in the sequence are 397, 1231, 23677, 1069, 4463, and the value is squared after each of these. Otherwise, the value is halved.
MATHEMATICA
NestList[If[PrimeQ[#], #^2, Quotient[#, 2]] &, 397, 50]
PROG
(Python)
from functools import lru_cache
from sympy import isprime
@lru_cache(maxsize=None)
def A376801(n): return (a**2 if isprime(a:=A376801(n-1)) else a>>1) if n else 397 # Chai Wah Wu, Oct 25 2024
CROSSREFS
Sequence in context: A298124 A327592 A340419 * A191942 A158316 A236713
KEYWORD
nonn
AUTHOR
Matthew House, Oct 04 2024
STATUS
approved