OFFSET
1,1
EXAMPLE
n=1506 is here because its iteration list = {1506, 1518, 1938, 2382, 2394, 2406, [2418, ...., 3582, 2418}. After a transient of length 6, the iteration ends in a cycle of length 14.
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
a097034Q[k_] :=
Module[{iter = NestWhileList[a063919, k, UnsameQ, All]},
Apply[Subtract, Reverse[Flatten[Position[iter, Last[iter]], 1]]] ==
14]
a097034[n_] := Select[Range[n], a097034Q]
a097034[5262] (* Hartmut F. W. Hoft, Jan 25 2024 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Aug 30 2004
STATUS
approved