This site is supported by donations to The OEIS Foundation.

Thanks to everyone who made a donation during our annual appeal!
To see the list of donors, or make a donation, see the OEIS Foundation home page.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A108738 a(n) = n/(smallest odd prime divisor of n), if any. 2
 1, 2, 1, 4, 1, 2, 1, 8, 3, 2, 1, 4, 1, 2, 5, 16, 1, 6, 1, 4, 7, 2, 1, 8, 5, 2, 9, 4, 1, 10, 1, 32, 11, 2, 7, 12, 1, 2, 13, 8, 1, 14, 1, 4, 15, 2, 1, 16, 7, 10, 17, 4, 1, 18, 11, 8, 19, 2, 1, 20, 1, 2, 21, 64, 13, 22, 1, 4, 23, 14, 1, 24, 1, 2, 25, 4, 11, 26, 1, 16, 27, 2, 1, 28, 17, 2, 29, 8, 1 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 COMMENTS a(n) = n if n has no odd prime divisor, i.e. for n = 2^k (k>=0). LINKS David A. Corneth, Table of n, a(n) for n = 1..10000 Z. Nedev and S. Muthukrishnan, The Nagger-Mover Game, DIMACS Tech. Report 2005-22. FORMULA a(n) = n/A078701(n). EXAMPLE a(21) = 21/3 = 7. MAPLE with(numtheory): a:=proc(n) local nn: nn:=factorset(n): if n=1 then 1 elif nn={2} then n elif nn[1]=2 then n/nn[2] else n/nn[1] fi end: seq(a(n), n=1..100); # Emeric Deutsch, Jun 24 2005 MATHEMATICA f[n_] := If[IntegerQ@Log[2, n], n, pf = First /@ FactorInteger@n; If[ EvenQ@n, n/pf[[2]], n/pf[[1]] ]]; Array[f, 89] (* Robert G. Wilson v, Sep 02 2006 *) PROG (PARI) a(n) = my(v = select(x->((x%2)==1), factor(n)[, 1]));  n/if (#v, vecmin(v), 1); \\ Michel Marcus, Oct 25 2017 (PARI) first(n) = {my(res = vector(n, i, i)); forprime(p = 3, n, for(k = 1, n\p, if(res[k*p] == k*p, res[k*p]\=p))); res} \\ David A. Corneth, Oct 25 2017 CROSSREFS Cf. A078701, A108514. Sequence in context: A076775 A218621 A079891 * A064405 A235872 A100762 Adjacent sequences:  A108735 A108736 A108737 * A108739 A108740 A108741 KEYWORD nonn,easy AUTHOR S. Muthukrishnan (muthu(AT)research.att.com), Jun 23 2005 EXTENSIONS More terms from Emeric Deutsch and Reinhard Zumkeller, Jun 24 2005 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 January 18 00:34 EST 2019. Contains 319255 sequences. (Running on oeis4.)