This site is supported by donations to The OEIS Foundation.

 Annual Appeal: Please make a donation to keep the OEIS running. In 2018 we replaced the server with a faster one, added 20000 new sequences, and reached 7000 citations (often saying "discovered thanks to the OEIS"). Other ways to donate

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A007978 Least non-divisor of n. 26
 2, 3, 2, 3, 2, 4, 2, 3, 2, 3, 2, 5, 2, 3, 2, 3, 2, 4, 2, 3, 2, 3, 2, 5, 2, 3, 2, 3, 2, 4, 2, 3, 2, 3, 2, 5, 2, 3, 2, 3, 2, 4, 2, 3, 2, 3, 2, 5, 2, 3, 2, 3, 2, 4, 2, 3, 2, 3, 2, 7, 2, 3, 2, 3, 2, 4, 2, 3, 2, 3, 2, 5, 2, 3, 2, 3, 2, 4, 2, 3, 2, 3, 2, 5, 2, 3, 2, 3, 2, 4, 2, 3, 2, 3, 2, 5, 2, 3, 2, 3 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 COMMENTS Least k >= 2 such that sigma(n) divides sigma(n*k), where sigma is A000203. - Benoit Cloitre, Dec 01 2002 Contains all and only the prime powers p^k, k > 0. The first occurrence of p^k is at A003418(p^k-1); so new records occur at indices in A051451. - Franklin T. Adams-Watters, Jun 13 2011 LINKS Reinhard Zumkeller, Table of n, a(n) for n = 1..10000 FORMULA a(n) = A053669(n) + A061853(n) = A055874(n) + 1. - Henry Bottomley, May 10 2001 G.f.: sum(k >= 2, -k*(x^A003418(k) - x^A003418(k-1))/((x^A003418(k) - 1)*(x^A003418(k-1) - 1))). - Robert Israel, Sep 02 2014 From Alonso del Arte, Sep 23 2017: (Start) a(n) < n for all n > 2. a(2n + 1) = 2, a(2n) >= 3. a(2^k) = 3 for k > 0. a(n!) = prime(pi(n) + 1) for n >= 0, except for a(3!) = 4. (End) MAPLE a:= proc(n) local k; for k from 2 while n mod k = 0 do od: k end proc: seq(a(n), n=1..100); # Robert Israel, Sep 02 2014 MATHEMATICA Table[k := 1; While[Mod[n, k] == 0, k++]; k, {n, 2000}]  (* Clark Kimberling, Jun 16 2012 *) Join[{2, 3}, Table[Complement[Range[n], Divisors[n]][[1]], {n, 3, 100}]] (* Alonso del Arte, Sep 23 2017 *) PROG (Haskell) import Data.List ((\\)) a007978 = head . ([1..] \\) . a027750_row -- Reinhard Zumkeller, May 10 2014 (PARI) a(n) = {my(k=2); while(!(n % k), k++); k; } \\ Michel Marcus, Sep 25 2017 CROSSREFS Cf. A003418, A051451, A055874, A053669, A061853, A027750. Cf. also A266620 (least non-divisor of n!). Sequence in context: A245511 A259940 A228829 * A245575 A096737 A304535 Adjacent sequences:  A007975 A007976 A007977 * A007979 A007980 A007981 KEYWORD nonn AUTHOR 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 December 17 14:12 EST 2018. Contains 318201 sequences. (Running on oeis4.)