%I #96 Jul 16 2020 11:47:52
%S 1,2,3,4,5,6,7,8,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
%T 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
%U 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9
%N The first repeating term in the trajectory of n under iterations of A329623, or -1 if no such terms exists.
%C A329623(n) = |n - A053392(n)|, where A053392 is the concatenation of the sums of pairs of consecutive digits.
%C This is the first number which appears twice for the iteration of A329623 starting with n. See A329624 for an explanation of the sequence, and for the number of iterations required before reaching this value. Terms a(9) to a(127) are all 9's, after which the sequence shows large jumps in value, e.g., a(1673) = 62626262626262626262626262637.
%C All -1 are so far conjectural, see A329624 and A329917 for more information.
%C The terms > 0 of this sequence are elements of cycles for A329623. Only 2-cycles and fixed points 1, 2, ..., 9 and 4...455 are known. Therefore a(n) is the earliest A329623^{k}(n) = A329623^{k+2}(n) if such k exist. See A328142 for the list of all possible values and more precise definitions. - _M. F. Hasler_, Dec 06 2019
%C The first escape value is a(1373) = -1. - _Georg Fischer_, Jul 16 2020
%H Scott R. Shannon, <a href="/A328865/b328865.txt">Table of n, a(n) for n = 1..10000</a>
%e a(10) = 9 as A329623(10) = 9, and A329623(9) = 9, thus 9 is the first repeating value.
%e a(128) = 182, as A329623(128) = 182, A329623(182) = 728, A329623(728) = 182, thus 182 is the first repeating value.
%e a(210) = 637, as A329623(210) = 179, A329623(179) = 637, A329623(637) = 273, A329623(273) = 637, thus 637 is the first repeating value.
%o (PARI) A328865(n,L=n^10)={my(o);-!until(n>L,o==(n=A329623(o=n))&&return(n))} \\ _M. F. Hasler_, Dec 06 2019
%Y Cf. A329623, A329624, A329917, A329200, A329197.
%K sign,base
%O 1,2
%A _Scott R. Shannon_, Nov 24 2019
%E Incorrect comment, link and program deleted following an observation by _Scott R. Shannon_, Nov 27 2019