OFFSET
1,1
COMMENTS
Claudia Spiro conjectured that for every initial number n the iteration sequence is eventually periodic.
The corresponding cycle lengths are: 2, 4, 6, 10, 12, 14, 16, 20, 22, 26, 28, 32, 34, 36, 44, 46, 52, 54.
LINKS
Claudia Spiro, An Iteration Problem Involving the Divisor Function, Acta Arithmetica, Vol. 46, No. 3 (1986), pp. 215-225.
EXAMPLE
The sequence for 93 is 93, 93 + d(93) = 97, 97 - d(97) = 95, 95 + d(95) = 99, 99 - d(99) = 93, 93 + d(93) = 97, ... with a cycle of (93, 97, 95, 99) whose length is 4. All initial numbers < 93 end in a cycle whose length < 4, thus 93 is in the sequence.
MATHEMATICA
lengths={}; Records={}; For[n=2, n<100, n++; c=1; v={}; m=0; s=1; a=n; i={}; While[m<10^6, AppendTo[v, a]; If[Length[v] > 3, i=LongestCommonSubsequencePositions[v[[1;; -3]], v[[-2;; -1]]], i = {}]; If[Length[i]==2 && Differences[i[[1]]][[1]]==1, c=Length[v]-i[[1]][[1]]-1; Break[]]; m++; a = a + s*DivisorSigma[0, a]; s = -s; ]; If[Length[lengths]==0 || c>lengths[[-1]], AppendTo[lengths, c]; AppendTo[Records, n]]]; Records
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Amiram Eldar, Apr 07 2017
EXTENSIONS
a(11)-a(18) from Giovanni Resta, Apr 07 2017
Wrong term 1 removed by Amiram Eldar, Jun 05 2017
STATUS
approved