OFFSET
1,1
COMMENTS
A247462 gives number of iterations needed to reach a(n). - Reinhard Zumkeller, Sep 17 2014
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
P. Schogt, The Wild Number Problem: math or fiction?, arXiv preprint arXiv:1211.6583 [math.HO], 2012. - From N. J. A. Sloane, Jan 03 2013
EXAMPLE
f(5/1) = 5/2 and f(5/2) = 7, so a(5)=7.
MATHEMATICA
nxt[n_]:=Module[{s=Numerator[n]+Denominator[n]}, Total[Transpose[ FactorInteger[ s]][[1]]]/PrimeNu[s]]; Table[NestWhile[nxt, nxt[n], !IntegerQ[#]&], {n, 90}] (* Harvey P. Dale, Mar 15 2013 *)
PROG
(Haskell)
import Data.Ratio ((%), numerator, denominator)
a058977 = numerator . until ((== 1) . denominator) f . f . fromIntegral
where f x = a008472 z % a001221 z
where z = numerator x + denominator x
-- Reinhard Zumkeller, Aug 29 2014
(PARI) f2(p, q) = my(f=factor(p+q)[, 1]~); vecsum(f)/#f;
f1(r) = f2(numerator(r), denominator(r));
loop(list) = {my(v=Vecrev(list)); for (i=2, #v, if (v[i] == v[1], return(1)); ); }
a(n) = {my(ok=0, m=f2(n, 1), list=List()); while(denominator(m) != 1, m = f1(m); listput(list, m); if (loop(list), return (0)); ); return(m); } \\ Michel Marcus, Feb 09 2022
CROSSREFS
KEYWORD
nonn,easy,nice
AUTHOR
N. J. A. Sloane, Jan 14 2001
EXTENSIONS
More terms from Matthew Conroy, Apr 18 2001
STATUS
approved