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!)
A007978 Least non-divisor of n. 32
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

Bakir Farhi, On the average asymptotic behavior of a certain type of sequences of integers, Integers, Vol. 9 (2009), pp. 555-567.

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)

Asymptotic mean: lim_{n->oo} Sum_{k=1..n} a(k) = 1 + A064859 (Farhi, 2009). - Amiram Eldar, Jun 29 2021

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, A064859.

Cf. also A266620 (least non-divisor of n!).

Sequence in context: A228829 A341982 A337686 * A245575 A333600 A339625

Adjacent sequences:  A007975 A007976 A007977 * A007979 A007980 A007981

KEYWORD

nonn

AUTHOR

Jeffrey Shallit

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 May 20 10:33 EDT 2022. Contains 353871 sequences. (Running on oeis4.)