login
A307655
If a(n) is prime then a(n+1) = a(n)^2+9, otherwise a(n+1) = floor(a(n)/2), with a(1) = 2.
1
2, 13, 178, 89, 7930, 3965, 1982, 991, 982090, 491045, 245522, 122761, 15070263130, 7535131565, 3767565782, 1883782891, 941891445, 470945722, 235472861, 117736430, 58868215, 29434107, 14717053, 7358526, 3679263, 1839631
OFFSET
1,1
COMMENTS
Question: does this sequence reach a cycle or does it increase without bound?
No cycle occurs in the first 324000 terms.
LINKS
dxdy forum, post (in Russian).
MATHEMATICA
Nest[Append[#, If[PrimeQ@ #[[-1]], #[[-1]]^2 + 9, Floor[#[[-1]]/2] ]] &, {2}, 25] (* Michael De Vlieger, Apr 21 2019 *)
PROG
(PARI) terms(n) = my(x=2, i=0); while(i < n, print1(x, ", "); i++; if(ispseudoprime(x), x=x^2+9, x=floor(x/2)))
/* Print initial 30 terms as follows: */
terms(30) \\ Felix Fröhlich, Apr 20 2019
CROSSREFS
Sequence in context: A268988 A183606 A366194 * A137610 A073178 A193192
KEYWORD
nonn,look
AUTHOR
Dmitry Kamenetsky, Apr 20 2019
STATUS
approved