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.

Showing 1-4 of 4 results.

A072747 Counting factor 2 in the first n squarefree numbers.

Original entry on oeis.org

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, 11, 11, 11, 12, 12, 12, 13, 13, 14, 14, 14, 15, 15, 15, 16, 16, 17, 17, 18, 18, 18, 19, 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 22, 22, 22, 23, 23, 23, 24, 24, 25, 25, 26, 26, 26
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 08 2002

Keywords

Examples

			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.
		

Crossrefs

Programs

  • Mathematica
    Accumulate[If[Divisible[#, 2], 1, 0]&/@Select[Range[100], SquareFreeQ]] (* Vincenzo Librandi, Aug 23 2015 *)
  • PARI
    n = 77; k = 0; bag = List(); a = vector(n);
    until(n == 0, k++; if (issquarefree(k), listput(bag, k); n--));
    for (i=2, #bag, a[i] = a[i-1] + (bag[i] % 2 == 0)); print(a); \\ Gheorghe Coserea, Aug 22 2015

Formula

a(n) ~ n/3. - Amiram Eldar, Feb 24 2021

Extensions

Name clarified by Gheorghe Coserea, Aug 22 2015

A072748 Counting factor 3 in the first n squarefree numbers.

Original entry on oeis.org

0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 6, 6, 6, 6, 6, 7, 7, 8, 8, 8, 8, 9, 9, 9, 10, 10, 10, 10, 10, 10, 11, 11, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 14, 14, 14, 15, 15, 15, 15, 15, 16, 16, 17, 17, 17, 17, 17, 18, 18, 19, 19, 19, 19, 19, 20, 20, 21, 21
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 08 2002

Keywords

Examples

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

Crossrefs

Programs

  • Mathematica
    Accumulate[If[Divisible[#, 3], 1, 0]&/@Select[Range[100], SquareFreeQ]] (* Vincenzo Librandi, Aug 23 2015 *)
  • PARI
    n = 80; k = 0; bag = List(); a = vector(n);
    until(n == 0, k++; if (issquarefree(k), listput(bag, k); n--));
    for (i=2, #bag, a[i] = a[i-1] + (bag[i] % 3 == 0));
    print(a); \\ Gheorghe Coserea, Aug 22 2015

Formula

a(n) ~ n/4. - Amiram Eldar, Feb 24 2021

Extensions

Name clarified by Gheorghe Coserea, Aug 22 2015

A072750 Counting factor 7 in the first n squarefree numbers.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 08 2002

Keywords

Examples

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

Crossrefs

Programs

  • Haskell
    a072750 n = a072750_list !! (n-1)
    a072750_list = scanl1 (+) $ map ((0 ^) . (`mod` 7)) a005117_list
    -- Reinhard Zumkeller, Mar 25 2013
    
  • Maple
    N:= 1000: # to use the squarefree numbers <= N
    M:= map(proc(t) if numtheory:-issqrfree(t) then if t mod 7 = 0 then 1 else 0 fi fi end proc, [$1..N]):
    ListTools:-PartialSums(M); # Robert Israel, Aug 23 2015
  • Mathematica
    With[{sf=Select[Range[200],SquareFreeQ]},Accumulate[If[Divisible[#,7],1,0]&/@sf]] (* Harvey P. Dale, Mar 21 2013 *)
  • PARI
    n = 94; k = 0; bag = List(); a = vector(n);
    until(n == 0, k++; if (issquarefree(k), listput(bag, k); n--));
    for (i=2, #bag, a[i] = a[i-1] + (bag[i] % 7 == 0));
    print(a); \\ Gheorghe Coserea, Aug 23 2015

Formula

a(n) - a(n-1) = 1 if A005117(n) is in A008589, otherwise 0. - Robert Israel, Aug 23 2015
a(n) ~ n/8. - Amiram Eldar, Feb 24 2021

Extensions

Name clarified by Gheorghe Coserea, Aug 23 2015

A072751 Greatest of the most frequent prime factors of squarefree numbers <= n; a(1)=1.

Original entry on oeis.org

1, 2, 3, 5, 3, 3, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 08 2002

Keywords

Comments

a(n)=2 for n>14.

Crossrefs

Programs

  • Mathematica
    max = 200; primeFactors = FactorInteger[#][[All, 1]]& /@ Select[Range[max], SquareFreeQ]; a[n_] := Sort[ Tally[ Take[ primeFactors, n] // Flatten], Which[#1[[2]] > #2[[2]], True, #1[[2]] == #2[[2]], #1[[1]] > #2[[1]], True, False]& ][[1, 1]]; Table[a[n], {n, 1, primeFactors // Length}] (* Jean-François Alcover, Oct 14 2013 *)
Showing 1-4 of 4 results.