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

%I #21 Feb 09 2022 09:04:56

%S 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,

%T 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,

%U 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

%N 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.

%C A247462 gives number of iterations needed to reach a(n). - _Reinhard Zumkeller_, Sep 17 2014

%H Reinhard Zumkeller, <a href="/A058977/b058977.txt">Table of n, a(n) for n = 1..10000</a>

%H 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 f(5/1) = 5/2 and f(5/2) = 7, so a(5)=7.

%t 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 *)

%o (Haskell)

%o import Data.Ratio ((%), numerator, denominator)

%o a058977 = numerator . until ((== 1) . denominator) f . f . fromIntegral

%o where f x = a008472 z % a001221 z

%o where z = numerator x + denominator x

%o -- _Reinhard Zumkeller_, Aug 29 2014

%o (PARI) f2(p,q) = my(f=factor(p+q)[,1]~); vecsum(f)/#f;

%o f1(r) = f2(numerator(r), denominator(r));

%o loop(list) = {my(v=Vecrev(list)); for (i=2, #v, if (v[i] == v[1], return(1)););}

%o 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

%Y Cf. A058971, A058972.

%Y Cf. A008472, A001221.

%Y Cf. A247462, A247468.

%K nonn,easy,nice

%O 1,1

%A _N. J. A. Sloane_, Jan 14 2001

%E More terms from _Matthew Conroy_, Apr 18 2001

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 24 22:17 EDT 2024. Contains 371964 sequences. (Running on oeis4.)