This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A058971 #29 Feb 28 2020 21:25:41 %S A058971 3,2,6,3,3,4,10,87,6,6,9,7,6,6,87,9,6,10,7,8,9,12,9,15,12,10,16,15,9, %T A058971 16,12,12,15,12,87,19,15,14,19,21,12,22,14,13,18,24,34,19,12,18,0,27, %U A058971 15,18,15,20,24,30,14,31,24,18,51,21,18,34,21,24,18,36,24,37,30,21,37 %N A058971 For a rational number p/q let f(p/q) = sum of divisors of p+q divided by number of divisors of p+q; a(n) is obtained by iterating f, starting at n/1, until an integer is reached, or if no integer is ever reached then a(n) = 0. %C A058971 a(p-1) = (p+1)/2 for all odd primes p. Thus there are infinitely many distinct terms. - _Ely Golden_, Mar 03 2018 %H A058971 Reinhard Zumkeller, <a href="/A058971/b058971.txt">Table of n, a(n) for n = 1..10000</a> %H A058971 P. Schogt, <a href="http://arxiv.org/abs/1211.6583">The Wild Number Problem: math or fiction?</a>, arXiv preprint arXiv:1211.6583 [math.HO], 2012. - From _N. J. A. Sloane_, Jan 03 2013 %e A058971 1 -> (1+2)/2 = 3/2 -> (1+5)/2 = 3, so a(1) = 3. %e A058971 51 -> 49/3 -> 49/3 -> ..., so a(51) = 0. %p A058971 with(numtheory); f := proc(n) if whattype(n) = integer then sigma(n+1)/sigma[0](n+1) else sigma(numer(n)+denom(n))/sigma[0](numer(n)+denom(n)); fi; end; %t A058971 f[x_] := With[{p = Numerator[x], q = Denominator[x]}, DivisorSigma[1, p+q]/DivisorSigma[0, p+q]]; a[n_] := If[ IntegerQ[ r = FixedPoint[f, n, SameTest -> (#1 == #2 || IntegerQ[#2] &)]], r, 0]; Table[a[n], {n, 1, 75}] (* _Jean-François Alcover_, Jul 18 2012 *) %o A058971 (Haskell) %o A058971 import Data.Ratio ((%), numerator, denominator) %o A058971 a058971 n = f [n % 1] where %o A058971 f xs@(x:_) | denominator y == 1 = numerator y %o A058971 | y `elem` xs = 0 %o A058971 | otherwise = f (y : xs) %o A058971 where y = (a000203 x') % (a000005 x') %o A058971 x' = numerator x + denominator x %o A058971 -- _Reinhard Zumkeller_, Aug 02 2012 %Y A058971 Cf. A058972, A058977. %K A058971 nonn,easy,nice %O A058971 1,1 %A A058971 _N. J. A. Sloane_, Jan 14 2001 %E A058971 More terms from _Matthew Conroy_, Apr 18 2001, who remarks that a(51) = a(655) = a(1039) = 0 are all the zeros of a(n) for n < 10^5 %E A058971 No more zero terms <= 10^6 found by _Reinhard Zumkeller_, Aug 02 2012