login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A058977 For a rational number p/q let f(p/q) = sum of distinct prime factors (A008472) of p+q divided by number of distinct prime factors (A001221) 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. 8
2, 3, 2, 5, 7, 7, 2, 3, 3, 11, 7, 13, 11, 4, 2, 17, 7, 19, 3, 5, 4, 23, 7, 5, 17, 3, 11, 29, 13, 31, 2, 7, 5, 6, 7, 37, 23, 8, 3, 41, 4, 43, 4, 4, 3, 47, 7, 7, 3, 10, 17, 53, 7, 8, 11, 11, 7, 59, 13, 61, 6, 5, 2, 9, 19, 67, 5, 13, 17, 71, 7, 73, 41, 4, 23, 9, 6, 79, 3, 3, 4, 83, 4, 11, 47 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
A247462 gives number of iterations needed to reach a(n). - Reinhard Zumkeller, Sep 17 2014
LINKS
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
Sequence in context: A354271 A344482 A092550 * A337246 A347104 A369687
KEYWORD
nonn,easy,nice
AUTHOR
N. J. A. Sloane, Jan 14 2001
EXTENSIONS
More terms from Matthew Conroy, Apr 18 2001
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 16:45 EDT 2024. Contains 371989 sequences. (Running on oeis4.)