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.

Previous Showing 41-50 of 98 results. Next

A125071 a(n) = sum of the exponents in the prime factorization of n which are not primes.

Original entry on oeis.org

0, 1, 1, 0, 1, 2, 1, 0, 0, 2, 1, 1, 1, 2, 2, 4, 1, 1, 1, 1, 2, 2, 1, 1, 0, 2, 0, 1, 1, 3, 1, 0, 2, 2, 2, 0, 1, 2, 2, 1, 1, 3, 1, 1, 1, 2, 1, 5, 0, 1, 2, 1, 1, 1, 2, 1, 2, 2, 1, 2, 1, 2, 1, 6, 2, 3, 1, 1, 2, 3, 1, 0, 1, 2, 1, 1, 2, 3, 1, 5, 4, 2, 1, 2, 2, 2, 2, 1, 1, 2, 2, 1, 2, 2, 2, 1, 1, 1, 1, 0, 1, 3, 1, 1, 3
Offset: 1

Views

Author

Leroy Quet, Nov 18 2006

Keywords

Examples

			720 has the prime-factorization of 2^4 *3^2 *5^1. Two of these exponents, 4 and 1, aren't primes. So a(720) = 4 + 1 = 5.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Plus @@ Select[Last /@ FactorInteger[n], ! PrimeQ[ # ] &];Table[f[n], {n, 110}] (* Ray Chandler, Nov 19 2006 *)
  • PARI
    A125071(n) = vecsum(apply(e -> if(isprime(e),0,e), factorint(n)[, 2])); \\ Antti Karttunen, Jul 07 2017

Formula

From Amiram Eldar, Sep 30 2023: (Start)
Additive with a(p^e) = A191558(e).
Sum_{k=1..n} a(k) ~ n * (log(log(n)) + B - C), where B is Mertens's constant (A077761) and C = Sum_{p prime} p * (P(p) - P(p+1)) - Sum_{k>=2} P(k) = 0.20171354082810650948..., where P(s) is the prime zeta function. (End)

Extensions

Extended by Ray Chandler, Nov 19 2006

A205745 a(n) = card { d | d*p = n, d odd, p prime }.

Original entry on oeis.org

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

Views

Author

Peter Luschny, Jan 30 2012

Keywords

Comments

Equivalently, a(n) is the number of prime divisors p|n such that n/p is odd. - Gus Wiseman, Jun 06 2018

Crossrefs

Programs

  • Haskell
    a205745 n = sum $ map ((`mod` 2) . (n `div`))
       [p | p <- takeWhile (<= n) a000040_list, n `mod` p == 0]
    -- Reinhard Zumkeller, Jan 31 2012
  • Mathematica
    a[n_] := Sum[ Boole[ OddQ[d] && PrimeQ[n/d] ], {d, Divisors[n]} ]; Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Jun 27 2013 *)
  • PARI
    a(n)=if(n%2,omega(n),n%4/2) \\ Charles R Greathouse IV, Jan 30 2012
    
  • Sage
    def A205745(n):
        return sum((n//d) % 2 for d in divisors(n) if is_prime(d))
    [A205745(n) for n in (1..105)]
    

Formula

O.g.f.: Sum_{p prime} x^p/(1 - x^(2p)). - Gus Wiseman, Jun 06 2018
Sum_{k=1..n} a(k) = (n/2) * (log(log(n)) + B) + O(n/log(n)), where B is Mertens's constant (A077761). - Amiram Eldar, Sep 21 2024

A366074 The number of "Fermi-Dirac primes" (A050376) that are unitary divisors of n.

Original entry on oeis.org

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

Views

Author

Amiram Eldar, Sep 28 2023

Keywords

Comments

First differs from A293439 at n = 128.

Crossrefs

Programs

  • Mathematica
    f[p_, e_] := If[e == 2^IntegerExponent[e, 2], 1, 0]; a[1] = 0; a[n_] := Plus @@ f @@@ FactorInteger[n]; Array[a, 100]
  • PARI
    a(n) = vecsum(apply(x -> (x == 1 << valuation(x, 2)), factor(n)[, 2]));

Formula

Additive with a(p^e) = A209229(e).
Sum_{k=1..n} a(k) ~ n * (log(log(n)) + B + C), where B is Mertens's constant (A077761) and C = -P(2) + Sum_{k>=1} (P(2^k) - P(2^k+1)) = -0.13145993422430119364..., where P(s) is the prime zeta function.

A366077 The number of prime factors of the cubefree part of n (A360539), counted with multiplicity.

Original entry on oeis.org

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

Views

Author

Amiram Eldar, Sep 28 2023

Keywords

Comments

The sum of exponents smaller than 3 in the prime factorization of n.

Crossrefs

Programs

  • Mathematica
    f[p_, e_] := If[e < 3, e, 0]; a[1] = 0; a[n_] := Plus @@ f @@@ FactorInteger[n]; Array[a, 100]
  • PARI
    a(n) = vecsum(apply(x -> if(x < 3, x, 0), factor(n)[, 2]));

Formula

a(n) = A001222(A360539(n)).
a(n) = A001222(n) - A366076(n).
Additive with a(p^e) = e if e <= 2, and a(p^e) = 0 for e >= 3.
a(n) >= 0, with equality if and only if n is cubefull (A036966).
a(n) <= A001222(n), with equality if and only if n is cubefree (A004709).
a(n) >= A366078(n), with equality if and only if n is squarefree (A005117).
Sum_{k=1..m} a(k) ~ n * (log(log(n)) + B + C), where B is Mertens's constant (A077761) and C = Sum_{p prime} (p-2)/p^3 = A085548 - 2 * A085541 = 0.10272214144217842566... .

A366246 The number of infinitary divisors of n that are "Fermi-Dirac primes" (A050376) and terms of A366242.

Original entry on oeis.org

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

Views

Author

Amiram Eldar, Oct 05 2023

Keywords

Crossrefs

Programs

  • Mathematica
    s[0] = 0; s[n_] := s[n] = s[Floor[n/4]] + If[OddQ[Mod[n, 4]], 1, 0]; f[p_, e_] := s[e]; a[1] = 0; a[n_] := Plus @@ f @@@ FactorInteger[n]; Array[a, 100]
  • PARI
    s(e) = if(e>3, s(e\4)) + e%2 \\ after Charles R Greathouse IV at A139351
    a(n) = vecsum(apply(s, factor(n)[, 2]));

Formula

Additive with a(p^e) = A139351(e).
a(n) = A064547(n) - A366247(n).
a(n) = A064547(A366244(n)).
a(n) >= 0, with equality if and only if n is in A366243.
a(n) <= A064547(n), with equality if and only if n is in A366242.
Sum_{k=1..n} a(k) ~ n * (log(log(n)) + B + C), where B is Mertens's constant (A077761) and C = Sum_{p prime} f(1/p) = -0.25705126777012995187..., where f(x) = - x + Sum_{k>=0} (x^(4^k)/(1+x^(4^k))).

A367169 a(n) is the sum of the exponents in the prime factorization of n that are powers of 2.

Original entry on oeis.org

0, 1, 1, 2, 1, 2, 1, 0, 2, 2, 1, 3, 1, 2, 2, 4, 1, 3, 1, 3, 2, 2, 1, 1, 2, 2, 0, 3, 1, 3, 1, 0, 2, 2, 2, 4, 1, 2, 2, 1, 1, 3, 1, 3, 3, 2, 1, 5, 2, 3, 2, 3, 1, 1, 2, 1, 2, 2, 1, 4, 1, 2, 3, 0, 2, 3, 1, 3, 2, 3, 1, 2, 1, 2, 3, 3, 2, 3, 1, 5, 4, 2, 1, 4, 2, 2, 2
Offset: 1

Views

Author

Amiram Eldar, Nov 07 2023

Keywords

Crossrefs

Programs

  • Mathematica
    f[p_, e_] := If[e == 2^IntegerExponent[e, 2], e, 0]; a[1] = 0; a[n_] := Plus @@ f @@@ FactorInteger[n]; Array[a, 100]
  • PARI
    a(n) = {my(f = factor(n)); sum(i = 1, #f~, if(f[i, 2] == 1 << valuation(f[i, 2], 2), f[i, 2], 0));}
    
  • Python
    from sympy import factorint
    def A367169(n): return sum(e for e in factorint(n).values() if not(e&-e)^e) # Chai Wah Wu, Nov 10 2023

Formula

a(n) = A001222(A367168(n)).
Additive with a(p^e) = A048298(e).
a(n) <= A001222(n), with equality if and only if n is in A138302.
Sum_{k=1..n} a(k) ~ n * (log(log(n)) + B + C), where B is Mertens's constant (A077761) and C = -P(2) + Sum_{k>=1} 2^k * (P(2^k) - P(2^k+1)) = 0.28425245481079272416..., where P(s) is the prime zeta function.

A376361 The number of distinct prime factors of the powerful numbers.

Original entry on oeis.org

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

Views

Author

Amiram Eldar, Sep 21 2024

Keywords

Crossrefs

Programs

  • Mathematica
    f[k_] := Module[{e = If[k == 1, {}, FactorInteger[k][[;; , 2]]]}, If[AllTrue[e, # > 1 &], Length[e], Nothing]]; Array[f, 3500]
  • PARI
    lista(kmax) = {my(e, is); for(k = 1, kmax, e = factor(k)[, 2]; is = 1; for(i = 1, #e, if(e[i] == 1, is = 0; break)); if(is, print1(#e, ", ")));}

Formula

a(n) = A001221(A001694(n)).
Sum_{A001694(k) <= x} a(k) = c * sqrt(x) * (log(log(x)) + B - log(2) + L(2, 3) - L(2, 4)) + O(sqrt(x)/log(x)), where c = zeta(3/2)/zeta(3) (A090699), B is Mertens's constant (A077761), L(h, r) = Sum_{p prime} 1/(p^(r/h - 1) * (p - p^(1 - 1/h) + 1)), L(2, 3) = 1.07848461669337535407..., and L(2, 4) = 0.57937575954505652569... (Das et al., 2024).

A376362 The number of unitary divisors that are squares of primes applied to the powerful numbers.

Original entry on oeis.org

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

Views

Author

Amiram Eldar, Sep 21 2024

Keywords

Crossrefs

Programs

  • Mathematica
    f[k_] := Module[{e = If[k == 1, {}, FactorInteger[k][[;; , 2]]]}, If[AllTrue[e, # > 1 &], Count[e, 2], Nothing]]; Array[f, 3500]
  • PARI
    lista(kmax) = {my(e, is); for(k = 1, kmax, e = factor(k)[, 2]; is = 1; for(i = 1, #e, if(e[i] == 1, is = 0; break)); if(is, print1(#select(x -> x == 2, e), ", ")));}

Formula

a(n) = A369427(A001694(n)).
Sum_{A001694(k) <= x} a(k) = c * sqrt(x) * (log(log(x)) + B - log(2) - L(2, 4)) + O(sqrt(x)/log(x)), where c = zeta(3/2)/zeta(3) (A090699), B is Mertens's constant (A077761), L(h, r) = Sum_{p prime} 1/(p^(r/h - 1) * (p - p^(1 - 1/h) + 1)), and L(2, 4) = 0.57937575954505652569... (Das et al., 2025).

A376363 The number of distinct prime factors of the cubefull numbers.

Original entry on oeis.org

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

Views

Author

Amiram Eldar, Sep 21 2024

Keywords

Crossrefs

Programs

  • Mathematica
    f[k_] := Module[{e = If[k == 1, {}, FactorInteger[k][[;; , 2]]]}, If[AllTrue[e, # > 2 &], Length[e], Nothing]]; Array[f, 60000]
  • PARI
    lista(kmax) = {my(e, is); for(k = 1, kmax, e = factor(k)[, 2]; is = 1; for(i = 1, #e, if(e[i] < 3, is = 0; break)); if(is, print1(#e, ", ")));}

Formula

a(n) = A001221(A036966(n)).
Sum_{A036966(k) <= x} a(k) = c * x^(1/3) * (log(log(x)) + B - log(3) + L(3, 4) - L(3, 6)) + O(x^(1/3)/log(x)), where c = A362974, B is Mertens's constant (A077761), L(h, r) = Sum_{p prime} 1/(p^(r/h - 1) * (p - p^(1 - 1/h) + 1)), L(3, 4) = 1.65235055631578303808..., and L(3, 6) = 0.67060646664392140547... (Das et al., 2024).

A099812 Number of distinct primes dividing 2n (i.e., omega(2n)).

Original entry on oeis.org

1, 1, 2, 1, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 3, 1, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 1, 3, 2, 3, 2, 2, 2, 3, 2, 2, 3, 2, 2, 3, 2, 2, 2, 2, 2, 3, 2, 2, 2, 3, 2, 3, 2, 2, 3, 2, 2, 3, 1, 3, 3, 2, 2, 3, 3, 2, 2, 2, 2, 3, 2, 3, 3, 2, 2, 2, 2, 2, 3, 3, 2, 3, 2, 2, 3, 3, 2, 3, 2, 3, 2, 2, 2, 3, 2, 2, 3, 2, 2, 4
Offset: 1

Views

Author

N. J. A. Sloane, Nov 19 2004

Keywords

Comments

Bisection of A001221.

Examples

			a(6) = 2 because 12 = 2*2*3 has 2 distinct prime divisors.
a(15) = 3 because 30 = 2*3*5 has 3 distinct prime divisors.
		

Crossrefs

Programs

  • Magma
    [#PrimeDivisors(2*n): n in [1..100]]; // Vincenzo Librandi, Jul 26 2017
  • Maple
    with(numtheory): omega:=proc(n) local div,A,j: div:=divisors(n): A:={}: for j from 1 to tau(n) do if isprime(div[j])=true then A:=A union {div[j]} else A:=A fi od: nops(A) end: seq(omega(2*n),n=1..130); # Emeric Deutsch, Mar 10 2005
  • Mathematica
    Table[PrimeNu[2*n], {n,1,50}] (* G. C. Greubel, May 21 2017 *)
  • PARI
    for(n=1,50, print1(omega(2*n), ", ")) \\ G. C. Greubel, May 21 2017
    

Formula

From Amiram Eldar, Sep 21 2024: (Start)
a(n) = A001221(2*n).
a(n) = omega(n) + 1 if n is odd, and a(n) = omega(n) if n is even.
Sum_{k=1..n} a(k) = n * (log(log(n)) + B + 1/2) + O(n/log(n)), where B is Mertens's constant (A077761). (End)

Extensions

More terms from Emeric Deutsch, Mar 10 2005
Previous Showing 41-50 of 98 results. Next