cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A007424 a(n) = 1 if n is squarefree, otherwise 2.

This page as a plain text file.
%I A007424 M0060 #37 May 07 2024 02:26:04
%S A007424 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,
%T A007424 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,
%U A007424 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
%N A007424 a(n) = 1 if n is squarefree, otherwise 2.
%D A007424 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%H A007424 Antti Karttunen, <a href="/A007424/b007424.txt">Table of n, a(n) for n = 1..65537</a>
%H A007424 <a href="/index/Eu#epf">Index entries for sequences computed from exponents in factorization of n</a>.
%F A007424 a(n) = 2 - A008966(n). - _Antti Karttunen_, Nov 18 2017
%F A007424 Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 2 - 6/Pi^2 = 1 + A229099. - _Amiram Eldar_, Sep 26 2022
%F A007424 a(n) = A051903(A007948(n)) = A130130(A051903(n)) for n >= 2. - _Amiram Eldar_, May 07 2024
%t A007424 Table[If[SquareFreeQ[n],1,2],{n,100}] (* _Harvey P. Dale_, Jul 09 2014 *)
%o A007424 (MuPAD) func(2-abs(numlib::moebius(n)), n):
%o A007424 (PARI) A007424(n) = (2-issquarefree(n)); \\ _Antti Karttunen_, Nov 18 2017
%Y A007424 Cf. A005117, A008966, A107078, A229099.
%Y A007424 Cf. A007948, A051903, A130130.
%K A007424 easy,nonn
%O A007424 1,4
%A A007424 _N. J. A. Sloane_