OFFSET
1,4
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
PROG
(Haskell)
import Data.Ratio ((%), numerator, denominator)
a058988 n = numerator $ fst $
until ((== 1) . denominator . fst) f $ f (fromIntegral n, []) where
f (x, ys) = if y `elem` ys then (0, []) else (y, y:ys) where
y = numerator x * denominator x % a000005 (numerator x + denominator x)
-- Reinhard Zumkeller, Aug 29 2014
(PARI) f2(p, q) = p*q/numdiv(p+q);
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
AUTHOR
N. J. A. Sloane, Jan 17 2001
EXTENSIONS
More terms from Naohiro Nomoto, Jul 20 2001
STATUS
approved