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.

A305614 Expansion of Sum_{p prime} x^p/(1 + x^p).

Original entry on oeis.org

0, 0, 1, 1, -1, 1, 0, 1, -1, 1, 0, 1, -2, 1, 0, 2, -1, 1, 0, 1, -2, 2, 0, 1, -2, 1, 0, 1, -2, 1, -1, 1, -1, 2, 0, 2, -2, 1, 0, 2, -2, 1, -1, 1, -2, 2, 0, 1, -2, 1, 0, 2, -2, 1, 0, 2, -2, 2, 0, 1, -3, 1, 0, 2, -1, 2, -1, 1, -2, 2, -1, 1, -2, 1, 0, 2, -2, 2, -1
Offset: 0

Views

Author

Gus Wiseman, Jun 06 2018

Keywords

Comments

a(n) is the number of prime divisors p|n such that n/p is odd, minus the number of prime divisors p|n such that n/p is even.

Examples

			The prime divisors of 12 are 2, 3. We see that 12/2 = 6, 12/3 = 4. None of those are odd, but both of them are even, so a(12) = -2.
The prime divisors of 30 are {2,3,5} with quotients {15,10,6}. One of these is odd and two are even, so a(30) = 1 - 2 = -1.
		

Crossrefs

Programs

  • Maple
    a:= n-> -add((-1)^(n/i[1]), i=ifactors(n)[2]):
    seq(a(n), n=0..100);  # Alois P. Heinz, Jun 07 2018
    # Alternative
    N:= 1000: # to get a(0)..a(N)
    V:= Vector(N):
    p:= 1:
    do
      p:= nextprime(p);
      if p > N then break fi;
      R:= [seq(i,i=p..N,p)];
      W:= ;
      V[R]:= V[R]+W;
    od:
    [0,seq(V[i],i=1..N)]; # Robert Israel, Jun 07 2018
  • Mathematica
    Table[Sum[If[PrimeQ[d], (-1)^(n/d - 1), 0], {d, Divisors[n]}], {n, 30}]

Formula

a(n) = -Sum_{p|n prime} (-1)^(n/p).
From Robert Israel, Jun 07 2018: (Start)
If n is odd, a(n) = A001221(n).
If n == 2 (mod 4), a(n) = 2 - A001221(n).
If n == 0 (mod 4) and n > 0, a(n) = -A001221(n). (End)
L.g.f.: log(Product_{k>=1} (1 + x^prime(k))^(1/prime(k))) = Sum_{n>=1} a(n)*x^n/n. - Ilya Gutkovskiy, Jul 30 2018

A106404 Number of even semiprimes dividing n.

Original entry on oeis.org

0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 2, 0, 1, 0, 1, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 2, 0, 1, 0, 1, 0, 2, 0, 1, 0, 2, 0, 2, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 1, 0, 2, 0, 2, 0, 2, 0, 2, 0, 1, 0, 2, 0, 2, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 2, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 2, 0, 2, 0
Offset: 1

Views

Author

Reinhard Zumkeller, May 02 2005

Keywords

Comments

Also the number of prime divisors p|n such that n/p is even. - Gus Wiseman, Jun 06 2018

Examples

			a(60) = #{4, 6, 10} = #{2*2, 2*3, 2*5} = 3.
		

Crossrefs

Programs

Formula

a(n) = A086971(n) - A106405(n).
a(A100484(n)) = 1.
a(A005408(n)) = 0.
a(A005843(n)) > 0 for n>1.
a(2n) = omega(n), a(2n+1) = 0, where omega(n) is the number of distinct prime divisors of n, A001221. - Franklin T. Adams-Watters, Jun 09 2006
a(n) = card { d | d*p = n, d even, p prime }. - Peter Luschny, Jan 30 2012
O.g.f.: Sum_{p prime} x^(2p)/(1 - x^(2p)). - Gus Wiseman, Jun 06 2018

A347957 Dirichlet convolution of A001221 (omega) with A003602 (Kimberling's paraphrases).

Original entry on oeis.org

0, 1, 1, 2, 1, 5, 1, 3, 3, 6, 1, 9, 1, 7, 7, 4, 1, 14, 1, 11, 8, 9, 1, 13, 4, 10, 8, 13, 1, 28, 1, 5, 10, 12, 9, 25, 1, 13, 11, 16, 1, 34, 1, 17, 22, 15, 1, 17, 5, 25, 13, 19, 1, 38, 11, 19, 14, 18, 1, 49, 1, 19, 26, 6, 12, 46, 1, 23, 16, 44, 1, 36, 1, 22, 31, 25, 12, 52, 1, 21, 22, 24, 1, 60, 14, 25, 19, 25, 1, 86
Offset: 1

Views

Author

Antti Karttunen, Sep 20 2021

Keywords

Crossrefs

Programs

Formula

a(n) = Sum_{d|n} A001221(n/d) * A003602(d).
From Antti Karttunen, Nov 13 2021: (Start)
The following two convolutions were found by Jon Maiga's Sequence Machine search algorithm. The first one is obvious, and even the second one should not be too hard to prove:
a(n) = Sum_{d|n} A023900(n/d) * A347956(d).
a(n) = Sum_{d|n} A181988(n/d) * A205745(d).
(End)

A068050 Number of values of k, 1<=k<=n, for which floor(n/k) is prime.

Original entry on oeis.org

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

Views

Author

Amarnath Murthy, Feb 12 2002

Keywords

Examples

			a(10) = 4 as floor(10/k) for k = 1 to 10 is 10,5,3,2,2,1,1,1,1,1, respectively; this is prime for k = 2,3,4,5.
		

Crossrefs

Programs

  • Haskell
    a068050 n = length [k | k <- [1..n], a010051 (n `div` k) == 1]
    -- Reinhard Zumkeller, Jan 31 2012
    
  • Mathematica
    a[n_] := Length[Select[Table[Floor[n/i], {i, 1, n}], PrimeQ]]
    Table[Count[Table[Floor[n/k],{k,n}],?PrimeQ],{n,80}] (* _Harvey P. Dale, Nov 19 2022 *)
  • PARI
    a(n) = sum(k=1, n, isprime(n\k)); \\ Michel Marcus, Jun 03 2024

Formula

If p is a prime other than 3, a(p) = a(p-1) + 1. - Franklin T. Adams-Watters, Apr 27 2020
a(n) = A179119*n + O(n^(1/2)). - Randell Heyman, Oct 06 2022
a(n) = Sum_{p prime and p<=n} (floor(n/p) - floor(n/(p+1))). - Ridouane Oudra, Jun 03 2024

Extensions

Edited by Dean Hickerson, Feb 12 2002
Showing 1-4 of 4 results.