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 51-60 of 98 results. Next

A125030 a(n) = sum of exponents in the prime factorization of n that are noncomposite.

Original entry on oeis.org

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

Views

Author

Leroy Quet, Nov 16 2006

Keywords

Examples

			a(720) = 3, since the prime factorization of 720 is 2^4 * 3^2 * 5^1 and two of the exponents in this factorization are noncomposites (the exponents 2 and 1, whose sum is 3).
		

Crossrefs

Programs

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

Formula

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

Extensions

Extended by Ray Chandler, Nov 19 2006

A125073 a(n) = sum of the exponents in the prime factorization of n which are triangular numbers.

Original entry on oeis.org

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

Views

Author

Leroy Quet, Nov 18 2006

Keywords

Examples

			The prime factorization of 360 is 2^3 *3^2 *5^1. There are two exponents in this factorization which are triangular numbers, 1 and 3. So a(360) = 1 + 3 = 4.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Plus @@ Select[Last /@ FactorInteger[n], IntegerQ[Sqrt[8# + 1]] &];Table[f[n], {n, 110}] (* Ray Chandler, Nov 19 2006 *)
  • PARI
    A010054(n) = issquare(8*n + 1); \\ This function from Michael Somos, Apr 27 2000.
    A125073(n) = vecsum(apply(e -> (A010054(e)*e), factorint(n)[, 2])); \\ Antti Karttunen, Jul 08 2017

Formula

Additive with a(p^e) = A010054(e)*e. - Antti Karttunen, Jul 08 2017
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>=2} (k*(k+1)/2) * (P(k*(k+1)/2) - P(k*(k+1)/2 + 1)) = -0.10099019472003733178..., where P(s) is the prime zeta function. - Amiram Eldar, Sep 28 2023

Extensions

Extended by Ray Chandler, Nov 19 2006

A318306 Additive with a(p^e) = A002487(e).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Aug 29 2018

Keywords

Crossrefs

Cf. also A046644.

Programs

  • PARI
    A002487(n) = { my(a=1, b=0); while(n>0, if(bitand(n, 1), b+=a, a+=b); n>>=1); (b); }; \\ From A002487
    A318306(n) = vecsum(apply(e -> A002487(e),factor(n)[,2]));
    
  • Python
    from functools import reduce
    from sympy import factorint
    def A318306(n): return sum(sum(reduce(lambda x,y:(x[0],x[0]+x[1]) if int(y) else (x[0]+x[1],x[1]),bin(e)[-1:2:-1],(1,0))) for e in factorint(n).values()) # Chai Wah Wu, May 18 2023

Formula

a(n) = A007814(A318307(n)).
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.15790080909728804399..., where f(x) = -x + x * (1-x) * Product{k>=0} (1 + x^(2^k) + x^(2^(k + 1))). - Amiram Eldar, Feb 11 2024

A318440 a(n) = A046645(n) - A007814(n); the 2-adic valuation of A299150.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Sep 02 2018

Keywords

Comments

After two initial terms, all terms are positive.

Crossrefs

Programs

  • Mathematica
    f[p_, e_] := (1 + Mod[p, 2])*e - DigitCount[e, 2, 1]; a[1] = 0; a[n_] := Plus @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Apr 28 2023 *)
  • PARI
    A007814(n) = valuation(n,2);
    A005187(n) = { my(s=n); while(n>>=1, s+=n); s; };
    A046645(n) = vecsum(apply(e -> A005187(e),factor(n)[,2]));
    A318440(n) = A046645(n) - A007814(n);

Formula

a(n) = A046645(n) - A007814(n).
a(n) = A007814(A299150(n)).
Additive with a(p^e) = (1 + (p mod 2))*e - A000120(e). - Amiram Eldar, Apr 28 2023
Sum_{k=1..n} a(k) ~ n * (log(log(n)) + B + C), where B is Mertens's constant (A077761) and C = -1 + Sum_{p prime} f(1/p) = 0.410258867603361890498..., where f(x) = -x + Sum_{k>=0} (2^(k+1)-1)*x^(2^k)/(1+x^(2^k)). - Amiram Eldar, Sep 30 2023

A318473 Additive with a(p^e) = A000045(e+1).

Original entry on oeis.org

0, 1, 1, 2, 1, 2, 1, 3, 2, 2, 1, 3, 1, 2, 2, 5, 1, 3, 1, 3, 2, 2, 1, 4, 2, 2, 3, 3, 1, 3, 1, 8, 2, 2, 2, 4, 1, 2, 2, 4, 1, 3, 1, 3, 3, 2, 1, 6, 2, 3, 2, 3, 1, 4, 2, 4, 2, 2, 1, 4, 1, 2, 3, 13, 2, 3, 1, 3, 2, 3, 1, 5, 1, 2, 3, 3, 2, 3, 1, 6, 5, 2, 1, 4, 2, 2, 2, 4, 1, 4, 2, 3, 2, 2, 2, 9, 1, 3, 3, 4, 1, 3, 1, 4, 3
Offset: 1

Views

Author

Antti Karttunen, Aug 29 2018

Keywords

Crossrefs

Differs from A008481 for the first time at n=32, where a(32)=8, while A008481(32)=7.

Programs

  • Mathematica
    a[n_] := Total@ Fibonacci[FactorInteger[n][[;; , 2]] + 1]; a[1] = 0; Array[a, 100] (* Amiram Eldar, May 15 2023 *)
  • PARI
    A318473(n) = vecsum(apply(e -> fibonacci(1+e),factor(n)[,2]));

Formula

a(n) = A007814(A318474(n)).
Sum_{k=1..n} a(k) ~ n * (log(log(n)) + B + C), where B is Mertens's constant (A077761) and C = Sum_{k>=2} Fibonacci(k-1) * P(k) = 1.30985781707683753402..., where P(s) is the prime zeta function. - Amiram Eldar, Oct 09 2023

A332423 If n = Product (p_j^k_j) then a(n) = Sum ((-1)^(k_j + 1) * k_j).

Original entry on oeis.org

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

Views

Author

Ilya Gutkovskiy, Feb 12 2020

Keywords

Comments

Sum of odd exponents in prime factorization of n minus the sum of even exponents in prime factorization of n.

Examples

			a(2700) = a(2^2 * 3^3 * 5^2) = -2 + 3 - 2 = -1.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Plus @@ ((-1)^(#[[2]] + 1) #[[2]] & /@ FactorInteger[n]); a[1] = 0; Table[a[n], {n, 1, 80}]
  • PARI
    a(n) = vecsum(apply(x -> (-1)^(x+1) * x, factor(n)[, 2])); \\ Amiram Eldar, Oct 09 2023

Formula

From Amiram Eldar, Oct 09 2023: (Start)
Additive with a(p^e) = (-1)^(e+1) * e.
a(n) = A350387(n) - A350386(n).
Sum_{k=1..n} a(k) ~ n * (log(log(n)) + B - C), where B is Mertens's constant (A077761) and C = Sum_{p prime} (3*p+1)/(p*(p+1)^2) = 0.81918453457738985491 ... . (End)

A349281 a(n) is the number of prime powers (not including 1) that are (1+e)-divisors of n.

Original entry on oeis.org

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

Views

Author

Amiram Eldar, Nov 13 2021

Keywords

Comments

(1+e)-divisors are defined in A049599.
First differs from A106490 at n = 64.
The total number of prime powers (not including 1) that divide n is A001222(n).
If p|n and p^e is the highest power of p that divides n, then the powers of p that are (1+e)-divisors of n are of the form p^d where d|e.

Examples

			8 has 3 (1+e)-divisors, 1, 2 and 8. Two of these divisors, 2 and 8 = 2^3 are prime powers. Therefore, a(8) = 2.
		

Crossrefs

Programs

  • Mathematica
    f[p_,e_] := DivisorSigma[0, e]; a[1] = 0; a[n_] := Plus @@ f @@@ FactorInteger[n]; Array[a,100]
  • PARI
    A349281(n) = vecsum(apply(e->numdiv(e),factor(n)[,2])); \\ Antti Karttunen, Nov 13 2021

Formula

Additive with a(p^e) = A000005(e).
a(n) <= A001222(n), with equality if and only if n is cubefree (A046099).
a(n) <= A049599(n)-1, with equality if and only if n is a prime power (including 1, A000961).
Sum_{k=1..n} a(n) ~ n * (log(log(n)) + B + C), where B is Mertens's constant (A077761) and C = Sum_{p prime} f(1/p) = 0.51780076119050171903..., where f(x) = -x + (1-x) * Sum_{k>=1} x^k/(1-x^k). - Amiram Eldar, Sep 29 2023

A366078 The number of distinct prime factors of the cubefree part of n (A360539).

Original entry on oeis.org

0, 1, 1, 1, 1, 2, 1, 0, 1, 2, 1, 2, 1, 2, 2, 0, 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, 1, 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, 1, 0, 2, 1, 3, 2, 2, 2
Offset: 1

Views

Author

Amiram Eldar, Sep 28 2023

Keywords

Comments

The number of exponents smaller than 3 in the prime factorization of n.
The number of prime factors of the cubefree part of n (A360539), counted with multiplicity is A366077(n).

Crossrefs

Programs

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

Formula

a(n) = A001221(A360539(n)).
a(n) = A001221(n) - A295659(n).
Additive with a(p^e) = 1 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) <= A001221(n), with equality if and only if n is cubefree (A004709).
a(n) <= A366077(n), with equality if and only if n is squarefree (A005117).
Sum_{k=1..m} a(k) = n * (log(log(n)) + B - C) + O(n/log(n)), where B is Mertens's constant (A077761) and C = Sum_{p prime} 1/p^3 = 0.174762... (A085541).

A366989 The number of prime powers p^q dividing n, where p is prime and q is either 1 or prime (A334393 without the first term 1).

Original entry on oeis.org

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

Views

Author

Amiram Eldar, Oct 31 2023

Keywords

Comments

First differs from A122810 at n = 48, and from A318322 at n = 64.

Crossrefs

Programs

  • Mathematica
    f[p_, e_] := PrimePi[e] + 1; a[1] = 0; a[n_] := Plus @@ f @@@ FactorInteger[n]; Array[a, 100]
  • PARI
    a(n) = {my(f = factor(n)); sum(i = 1, #f~, 1 + primepi(f[i, 2]));}

Formula

Additive with a(p^e) = A000720(e) + 1.
a(n) = 1 is and only if n is squarefree (A005117) > 1.
a(n) = A366988(n) + A001221(n).
Sum_{k=1..n} a(k) ~ n * (log(log(n)) + B + C), where B is Mertens's constant (A077761), C = Sum_{p prime} P(p) = 0.67167522222173297323..., and P(s) is the prime zeta function.

A376364 The number of unitary divisors that are cubes of primes applied to the cubefull numbers.

Original entry on oeis.org

0, 1, 0, 1, 0, 0, 0, 1, 0, 2, 0, 0, 1, 1, 0, 0, 1, 0, 1, 2, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 2, 0, 2, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 2, 0, 1, 0, 2, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 2, 1, 0, 0, 0, 1, 1, 0, 1, 1, 3, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 2, 0, 2, 0, 0, 1, 2, 1, 0, 0, 0, 1, 1, 2, 2, 1, 0, 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 &], Count[e, 3], 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(#select(x -> x == 3, e), ", ")));}

Formula

a(n) = A295883(A036966(n)).
Sum_{A036966(k) <= x} a(k) = c * sqrt(x) * (log(log(x)) + B - log(3) - 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)), and L(3, 6) = 0.67060646664392140547... (Das et al., 2025).
Previous Showing 51-60 of 98 results. Next