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-5 of 5 results.

A367098 Number of divisors of n with exactly two distinct prime factors.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Nov 09 2023

Keywords

Examples

			The a(n) divisors for n = 1, 6, 12, 24, 36, 60, 72, 120, 144, 216, 288, 360:
  .  6  6   6   6   6   6   6   6    6    6    6
        12  12  12  10  12  10  12   12   12   10
            24  18  12  18  12  18   18   18   12
                36  15  24  15  24   24   24   15
                    20  36  20  36   36   36   18
                        72  24  48   54   48   20
                            40  72   72   72   24
                                144  108  96   36
                                     216  144  40
                                          288  45
                                               72
		

Crossrefs

For just one distinct prime factor we have A001222 (prime-power divisors).
This sequence counts divisors belonging to A007774.
Counting all prime factors gives A086971, firsts A220264.
Column k = 2 of A146289.
- Positions of zeros are A000961 (powers of primes), complement A024619.
- Positions of ones are A006881 (squarefree semiprimes).
- Positions of twos are A054753.
- Positions of first appearances are A367099.
A001221 counts distinct prime factors.
A001358 lists semiprimes, complement A100959.
A367096 lists semiprime divisors, sum A076290.

Programs

  • Mathematica
    Table[Length[Select[Divisors[n], PrimeNu[#]==2&]],{n,100}]
    a[1] = 0; a[n_] := (Total[(e = FactorInteger[n][[;; , 2]])]^2 - Total[e^2])/2; Array[a, 100] (* Amiram Eldar, Jan 08 2024 *)
  • PARI
    a(n) = {my(e = factor(n)[, 2]); (vecsum(e)^2 - e~*e)/2;} \\ Amiram Eldar, Jan 08 2024

Formula

a(n) = (A001222(n)^2 - A090885(n))/2. - Amiram Eldar, Jan 08 2024

A332385 Sum of squares of indices of distinct prime factors of n.

Original entry on oeis.org

0, 1, 4, 1, 9, 5, 16, 1, 4, 10, 25, 5, 36, 17, 13, 1, 49, 5, 64, 10, 20, 26, 81, 5, 9, 37, 4, 17, 100, 14, 121, 1, 29, 50, 25, 5, 144, 65, 40, 10, 169, 21, 196, 26, 13, 82, 225, 5, 16, 10, 53, 37, 256, 5, 34, 17, 68, 101, 289, 14, 324, 122, 20, 1, 45, 30, 361, 50, 85, 26, 400, 5, 441, 145, 13
Offset: 1

Views

Author

Ilya Gutkovskiy, Feb 10 2020

Keywords

Examples

			a(21) = a(3 * 7) = a(prime(2) * prime(4)) = 2^2 + 4^2 = 20.
		

Crossrefs

Programs

  • Maple
    a:= n-> add(numtheory[pi](i[1])^2, i=ifactors(n)[2]):
    seq(a(n), n=1..80);  # Alois P. Heinz, Feb 10 2020
  • Mathematica
    nmax = 75; CoefficientList[Series[Sum[k^2 x^Prime[k]/(1 - x^Prime[k]), {k, 1, nmax}], {x, 0, nmax}], x] // Rest
    a[n_] := Plus @@ (PrimePi[#[[1]]]^2 & /@ FactorInteger[n]); Table[a[n], {n, 1, 75}]

Formula

G.f.: Sum_{k>=1} k^2 * x^prime(k) / (1 - x^prime(k)).
If n = Product (p_j^k_j) then a(n) = Sum (pi(p_j)^2), where pi = A000720.

A351397 Sum of the exponents in the prime factorizations of the prime power divisors of n.

Original entry on oeis.org

0, 1, 1, 3, 1, 2, 1, 6, 3, 2, 1, 4, 1, 2, 2, 10, 1, 4, 1, 4, 2, 2, 1, 7, 3, 2, 6, 4, 1, 3, 1, 15, 2, 2, 2, 6, 1, 2, 2, 7, 1, 3, 1, 4, 4, 2, 1, 11, 3, 4, 2, 4, 1, 7, 2, 7, 2, 2, 1, 5, 1, 2, 4, 21, 2, 3, 1, 4, 2, 3, 1, 9, 1, 2, 4, 4, 2, 3, 1, 11, 10, 2, 1, 5, 2, 2, 2, 7, 1, 5, 2, 4, 2
Offset: 1

Views

Author

Wesley Ivan Hurt, Feb 09 2022

Keywords

Comments

a(n) is the sum of all the k's in the divisors of n of the form p^k, where p is prime and k>=1.

Examples

			a(8) = 6; The prime power divisors of 8 are 2,4,8 with prime factorizations 2^1,2^2,2^3 and the sum of the exponents in their prime factorizations is 1+2+3 = 6.
a(20) = 4; The prime power divisors of 20 are 2,4,5 with prime factorizations 2^1,2^2,5^1 and the sum of the exponents in each of their prime factorizations is 1+2+1 = 5.
		

Crossrefs

Cf. A001221 (omega), A001222 (Omega), A077761, A246655.

Programs

  • Mathematica
    f[p_, e_] := e*(e + 1)/2; a[1] = 0; a[n_] := Plus @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Feb 10 2022 *)
  • PARI
    a(n) = sumdiv(n, d, my(x); if (x=isprimepower(d), x)); \\ Michel Marcus, Feb 10 2022

Formula

a(n) = Sum_{d|n} Omega(d) * [omega(d) = 1].
Additive with a(p^e) = e*(e+1)/2. - Amiram Eldar, Feb 10 2022
Sum_{k=1..n} a(k) ~ n * (log(log(n)) + B + C), where B is Mertens's constant (A077761) and C = Sum_{k>=2} (k * P(k)) = 2.14822166379843041578..., where P(s) is the prime zeta function. - Amiram Eldar, Oct 05 2023
From Ridouane Oudra, Aug 16 2024: (Start)
a(n) = (A001222(n) + A090885(n))/2 ;
a(n) = Sum_{d|n} A100995(d). (End)

A360108 Sum of squares of digits of primorial base expansion of n.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jan 28 2023

Keywords

Examples

			5 in primorial base (A049345) is written as "21" (because 5 = 2*2 + 1*1), therefore a(5) = 2^2 + 1^2 = 5.
23 in primorial base is written as "321" (because 23 = 3*6 + 2*2 + 1*1), therefore a(23) = 3^2 + 2^2 + 1^2 = 14.
24 in primorial base is written as "400" (because 24 = 4*6 + 0*2 + 0*1), therefore a(24) = 4^2 = 16.
		

Crossrefs

Cf. A002110 (positions of 1's), A049345, A090885, A276086, A276150.
Cf. also A003132.

Programs

  • Mathematica
    a[n_] := Module[{k = n, p = 2, s = 0, r}, While[{k, r} = QuotientRemainder[k, p]; k != 0 || r != 0, s += r^2; p = NextPrime[p]]; s]; Array[a, 100, 0] (* Amiram Eldar, Mar 06 2024 *)
  • PARI
    A360108(n) = { my(s=0, p=2, d); while(n, d = (n%p); s += d^2; n = (n-d)/p; p = nextprime(1+p)); (s); };

Formula

a(n) = A090885(A276086(n)).
For all n >= 0, a(2n+1) = 1 + a(2n).

A384815 Sum of the cubes of the exponents in the prime factorization of n.

Original entry on oeis.org

0, 1, 1, 8, 1, 2, 1, 27, 8, 2, 1, 9, 1, 2, 2, 64, 1, 9, 1, 9, 2, 2, 1, 28, 8, 2, 27, 9, 1, 3, 1, 125, 2, 2, 2, 16, 1, 2, 2, 28, 1, 3, 1, 9, 9, 2, 1, 65, 8, 9, 2, 9, 1, 28, 2, 28, 2, 2, 1, 10, 1, 2, 9, 216, 2, 3, 1, 9, 2, 3, 1, 35, 1, 2, 9, 9, 2, 3, 1, 65, 64, 2, 1, 10, 2, 2, 2, 28, 1, 10
Offset: 1

Views

Author

Ilya Gutkovskiy, Jun 10 2025

Keywords

Crossrefs

Programs

  • Mathematica
    Join[{0}, Table[Plus @@ (#[[2]]^3 & /@ FactorInteger[n]), {n, 2, 90}]]
  • PARI
    a(n) = my(f=factor(n)); sum(k=1, #f~, f[k,2]^3); \\ Michel Marcus, Jun 10 2025

Formula

If n = Product (p_j^k_j) then a(n) = Sum (k_j^3).
From Amiram Eldar, Jul 03 2025: (Start)
Additive with a(p^e) = e^3.
Sum_{k=1..n} a(k) ~ n * log(log(n)) + B_3 * n + O(n/log(n)), where B_3 = gamma + Sum_{p prime} ((1-1/p)*Sum_{m>=1} m^3/p^m + log(1-1/p)) = 16.17021843694072992072..., and gamma is Euler's constant (A001620) (Duncan, 1962). (End)
Showing 1-5 of 5 results.