A097028 Function f(x) = EulerPhi(x) + floor(x/2) is iterated; a(n) is the length of transient part and terminal cycle if the iteration was initiated at n. So a(n) is the number of distinct terms arising during iteration.
1, 1, 1, 1, 2, 2, 3, 1, 2, 2, 2, 3, 3, 4, 1, 1, 5, 2, 5, 3, 2, 2, 4, 4, 2, 3, 4, 4, 6, 4, 3, 1, 4, 5, 5, 4, 4, 5, 23, 5, 4, 5, 22, 6, 2, 2, 24, 6, 25, 3, 3, 4, 23, 3, 21, 5, 2, 3, 21, 3, 25, 26, 21, 1, 6, 24, 20, 25, 23, 22, 27, 4, 26, 27, 36, 28, 35, 22, 33, 5, 30, 31, 20, 25, 28, 29, 20, 26, 29
Offset: 1
Keywords
Examples
For n=70, iteration list = {70, 59, 87, 99, 109, 162, 135, 139, 207, 235, 301, 402, 333, 382, 381, 442, [413, 554, 553, 744, 612, 498], 413}, a(70) = 22. n=2^j: a(2^j)=1, powers of 2 are fixed points, free of transients, so t + c = 0 + 1 = 1.
Programs
-
Mathematica
Table[Length@ Union@ NestList[EulerPhi@ # + Floor[#/2] &, n, 10^3], {n, 10^3}] (* Michael De Vlieger, Feb 27 2017 *)
Comments