OFFSET
1,3
COMMENTS
It appears that the sequence always reaches 2, 5, or 29 for any initial value n. Is this easy to prove?
It appears that a(n) is 1 whenever n>29 and n mod 10 is one of {0,1,2,4,6,8,9}. This has been verified to n=5000. Also, it appears that a(n) is 9 whenever n mod 130 is one of {3,23,55,75,107,127}. This has also been verified to n=5000. Are these conjectures easy to prove?
From Antti Karttunen, May 19 2021: (Start)
Note that the first four terms of iteration 47017 -> 2210598293 -> 4886744813014513853 -> 23880274867524255960728999629928905613 are all primes (see also A231120), but then (4+(23880274867524255960728999629928905613^2)) is composite, and its smallest prime divisor is 1946761. Actually, a(23880274867524255960728999629928905613) = 2, thus a(47017) = 5.
(End)
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..47016
EXAMPLE
For n=3, we have 3 -> (3^2+4)/d = 13/1 -> (13^2+4)/d = 173/1 -> (173^2+4)/d = 29933/809 = 37, since the divisors of 29933 are {1,37,809,29933}. Continuing, we get the orbit {3,13,173,37,1373,1217,97,9413,89,5,29,5,29,...}, showing that 5 is reached after 9 steps, after which the orbit is periodic {...,5,29,5,29,...}. Thus a(3)=9.
PROG
(PARI)
f(k) = { my(u=(4+(k^2)), ds=divisors(u)); (u/ds[#ds-1]); };
\\ Alternatively, "f" could be defined as:
f(k) = { my(u=(4+(k^2))); (u/A032742(u)); };
A032742(n) = if(1==n||isprime(n), 1, forprime(p=2, n, if(!(n%p), return(n/p)))); \\ And not requiring full factorization when this is used. - Antti Karttunen, May 19 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
John W. Layman, Aug 30 2010
STATUS
approved