OFFSET
1,1
COMMENTS
If x>100000 is there another cycle?
No other cycle found below 10^8. - Michel Marcus, Nov 27 2013
LINKS
K. S. Brown, Linear Sum of Prime Factors
PROG
(PARI) iscycle(v, nextn) = {for (i=1, #v, if (v[i] == nextn, return (1); ); ); return (0); }
fcycle(n, known) = {v = vector(1); v[1] = n; first = n; while((nextn = soph(n)) <= first, if (vecsearch(known, nextn), return([])); if (iscycle(v, nextn), return (v)); v = concat(v, nextn); n = nextn; ); return ([]); }
fcycles(na, nb) = {known = [30089]; known = []; for(n = na, nb, v = fcycle(n, known); if (#v, print(v, ", "); return(); ); ); } \\ Displays sequence terms or search for higher cycle, depending on the order of the 2 "known=" lines. - Michel Marcus, Nov 29 2013
CROSSREFS
KEYWORD
nonn,fini,full
AUTHOR
Benoit Cloitre, Jun 03 2002
STATUS
approved
