OFFSET
1,1
EXAMPLE
n = 570: list = {570, 870, 1290, [1878, 1890, 2142, 2178, 1482], 1878}; after 3 transients, a 5-cycle arises.
n = 1230: {1230, 1794, 2238, 2250, 1530, 1710, [1890, 2142, 2178, 1482, 1878]} ; the iteration to the 5-cycle is not necessarily monotone. - Hartmut F. W. Hoft, Jan 25 2024
MATHEMATICA
a063919[1] = 1; (* function a[] in A063919 by Jean-François Alcover *)
a063919[n_] := Total[Select[Divisors[n], GCD[#, n/#]==1&]]-n/; n>1
a097035Q[k_] := Module[{iter=NestWhileList[a063919, k, UnsameQ, All]}, Apply[Subtract, Reverse[Flatten[Position[iter, Last[iter]], 1]]]==5]
a097035[n_] := Select[Range[n], a097035Q]
a097035[5418] (* Hartmut F. W. Hoft, Jan 25 2024 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Aug 30 2004
STATUS
approved