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!)
A072747 Counting factor 2 in the first n squarefree numbers. 5

%I #20 Feb 24 2021 03:50:17

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

%T 11,11,11,12,12,12,13,13,14,14,14,15,15,15,16,16,17,17,18,18,18,19,19,

%U 19,19,19,20,20,20,20,21,21,21,22,22,22,23,23,23,24,24,25,25,26,26,26

%N Counting factor 2 in the first n squarefree numbers.

%H Gheorghe Coserea, <a href="/A072747/b072747.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) ~ n/3. - _Amiram Eldar_, Feb 24 2021

%e The first 10 squarefree numbers are: 1, 2, 3, 5, 6=2*3, 7, 10=2*5, 11, 13 and 14=2*7: 2, 6, 10 and 14 are divisible by 2, therefore a(10)=4.

%t Accumulate[If[Divisible[#, 2], 1, 0]&/@Select[Range[100], SquareFreeQ]] (* _Vincenzo Librandi_, Aug 23 2015 *)

%o (PARI)

%o n = 77; k = 0; bag = List(); a = vector(n);

%o until(n == 0, k++; if (issquarefree(k), listput(bag, k); n--));

%o for (i=2, #bag, a[i] = a[i-1] + (bag[i] % 2 == 0)); print(a); \\ _Gheorghe Coserea_, Aug 22 2015

%Y Cf. A005117, A072748, A072749, A072750, A072751.

%K nonn

%O 1,5

%A _Reinhard Zumkeller_, Jul 08 2002

%E Name clarified by _Gheorghe Coserea_, Aug 22 2015

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 09:38 EDT 2024. Contains 371967 sequences. (Running on oeis4.)