The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A177980 Iterate (n + lpf(n)) / 2 until a prime is reached, where lpf equals the least prime factor. a(n) is that terminating prime. 3
 2, 3, 3, 5, 3, 7, 5, 3, 3, 11, 7, 13, 5, 3, 3, 17, 3, 19, 11, 7, 7, 23, 13, 3, 5, 3, 3, 29, 3, 31, 17, 3, 3, 11, 19, 37, 11, 7, 7, 41, 7, 43, 23, 13, 13, 47, 3, 3, 5, 3, 3, 53, 3, 3, 29, 3, 3, 59, 31, 61, 17, 3, 3, 11, 3, 67, 11, 19, 19, 71, 37, 73, 11 (list; graph; refs; listen; history; text; internal format)
 OFFSET 2,1 COMMENTS The function (n + lpf(n)) / 2 reduces the input according to its lowest prime factor if it is composite, and simply returns the input if it is prime. Sequence contains only prime numbers (and every prime number). LINKS EXAMPLE 7 is prime, so (7 + lpf(7)) / 2 = (7 + 7) / 2 = 7. 15 is composite: (15 + 3) / 2 = 9, (9 + 3) / 2 = 6, (6 + 2) / 2 = 4, (4 + 2) / 2 = 3. MATHEMATICA g[n_] := (n + FactorInteger[n][[1, 1]])/2; f[n_] := Last@ NestWhileList[g, n, !PrimeQ@ # &]; Array[f, 73, 2] CROSSREFS Cf. A020639, A061228. Sequence in context: A333496 A152864 A152984 * A215405 A064921 A064917 Adjacent sequences:  A177977 A177978 A177979 * A177981 A177982 A177983 KEYWORD nonn AUTHOR Grant Garcia, Dec 16 2010 STATUS approved

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

Last modified June 19 16:01 EDT 2021. Contains 345144 sequences. (Running on oeis4.)