This site is supported by donations to The OEIS Foundation.

 Please make a donation to keep the OEIS running. We are now in our 55th year. In the past year we added 12000 new sequences and reached 8000 citations (which often say "discovered thanks to the OEIS"). We need to raise money to hire someone to manage submissions, which would reduce the load on our editors and speed up editing. Other ways to donate

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A007424 a(n) = 1 if n is squarefree, otherwise 2. (Formerly M0060) 2
 1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 2, 1, 2, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 2, 2, 2, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 1, 2, 2, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 2, 2, 2 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,4 REFERENCES N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence). LINKS Antti Karttunen, Table of n, a(n) for n = 1..65537 FORMULA a(n) = 2 - A008966(n). - Antti Karttunen, Nov 18 2017 MATHEMATICA f[n_]:=Union[Last/@FactorInteger[n]][[ -1]]; lst={1}; Do[If[f[n]==1, AppendTo[lst, 1], AppendTo[lst, 2]], {n, 2, 6!}]; lst (* Vladimir Joseph Stephan Orlovsky, Mar 07 2010 *) Table[If[SquareFreeQ[n], 1, 2], {n, 100}] (* Harvey P. Dale, Jul 09 2014 *) PROG (MuPAD) func(2-abs(numlib::moebius(n)), n): (PARI) A007424(n) = (2-issquarefree(n)); \\ Antti Karttunen, Nov 18 2017 CROSSREFS Cf. A005117, A008966, A107078. Sequence in context: A037306 A194799 A291119 * A323308 A278908 A307848 Adjacent sequences:  A007421 A007422 A007423 * A007425 A007426 A007427 KEYWORD easy,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 10 00:54 EST 2019. Contains 329885 sequences. (Running on oeis4.)