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!)
A285879 Number of odd squarefree numbers <= n. 3

%I #24 Dec 07 2019 12:18:29

%S 1,1,2,2,3,3,4,4,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,11,11,11,11,12,

%T 12,13,13,14,14,15,15,16,16,17,17,18,18,19,19,19,19,20,20,20,20,21,21,

%U 22,22,23,23,24,24,25,25,26,26,26,26,27,27,28,28,29,29,30,30,31,31,31,31,32,32,33,33,33,33,34,34,35

%N Number of odd squarefree numbers <= n.

%H Robert Israel, <a href="/A285879/b285879.txt">Table of n, a(n) for n = 1..10000</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/Squarefree.html">Squarefree</a>

%F G.f.: Sum_{k>=1} x^A056911(k)/(1 - x).

%F a(n) ~ 4*n/Pi^2. See A185199.

%F a(n) = Sum_{k=1..n} A008683(2k)^2. - _Ridouane Oudra_, Aug 16 2019

%p ListTools:-PartialSums(map(op,[seq(`if`(numtheory:-issqrfree(n),[1,0],[0,0]),n=1..100,2)])); # _Robert Israel_, May 07 2018

%p seq(add(mobius(2*k)^2, k=1..n), n=1..100); # _Ridouane Oudra_, Aug 16 2019

%t Table[Sum[Boole[OddQ[k] && SquareFreeQ[k]], {k, 1, n}], {n, 85}]

%t nmax = 85; Rest[CoefficientList[Series[Sum[Boole[OddQ[k] && MoebiusMu[k]^2 == 1] x^k/(1 - x), {k, 1, nmax}], {x, 0, nmax}], x]]

%o (PARI) a(n) = sum(k=1, n, (k%2)*issquarefree(k)); \\ _Michel Marcus_, Apr 27 2017

%o (Python)

%o from sympy.ntheory.factor_ import core

%o def a(n): return sum([1 for k in range(1, n + 1) if k%2==1 and core(k)==k]) # _Indranil Ghosh_, Apr 28 2017

%Y Cf. A005117, A008683, A013928, A056911, A185199, A285881.

%K nonn

%O 1,3

%A _Ilya Gutkovskiy_, Apr 27 2017

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 April 25 01:35 EDT 2024. Contains 371964 sequences. (Running on oeis4.)