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-10 of 14 results. Next

A022559 Sum of exponents in prime-power factorization of n!.

Original entry on oeis.org

0, 0, 1, 2, 4, 5, 7, 8, 11, 13, 15, 16, 19, 20, 22, 24, 28, 29, 32, 33, 36, 38, 40, 41, 45, 47, 49, 52, 55, 56, 59, 60, 65, 67, 69, 71, 75, 76, 78, 80, 84, 85, 88, 89, 92, 95, 97, 98, 103, 105, 108, 110, 113, 114, 118, 120, 124, 126, 128, 129, 133, 134, 136, 139
Offset: 0

Views

Author

Karen E. Wandel (kw29(AT)evansville.edu)

Keywords

Comments

Partial sums of Omega(n) (A001222). - N. J. A. Sloane, Feb 06 2022

Examples

			For n=5, 5! = 120 = 2^3*3^1*5^1 so a(5) = 3+1+1 = 5. - _N. J. A. Sloane_, May 26 2018
		

Crossrefs

Programs

  • Haskell
    a022559 n = a022559_list !! n
    a022559_list = scanl (+) 0 $ map a001222 [1..]
    -- Reinhard Zumkeller, Feb 16 2012
    
  • Maple
    with(numtheory):with(combinat):a:=proc(n) if n=0 then 0 else bigomega(numbperm(n)) fi end: seq(a(n), n=0..63); # Zerinvary Lajos, Apr 11 2008
    # Alternative:
    ListTools:-PartialSums(map(numtheory:-bigomega, [$0..200])); # Robert Israel, Dec 21 2018
  • Mathematica
    Array[Plus@@Last/@FactorInteger[ #! ] &, 5!, 0] (* Vladimir Joseph Stephan Orlovsky, Nov 10 2009 *)
    f[n_] := If[n <= 1, 0, Total[FactorInteger[n]][[2]]]; Accumulate[Array[f, 100, 0]] (* T. D. Noe, Apr 11 2011 *)
    Table[PrimeOmega[n!], {n, 0, 70}] (* Jean-François Alcover, Jun 08 2013 *)
    Join[{0}, Accumulate[PrimeOmega[Range[70]]]] (* Harvey P. Dale, Jul 23 2013 *)
  • PARI
    a(n)=bigomega(n!)
    
  • PARI
    first(n)={my(k=0); vector(n, i, k+=bigomega(i))}
    
  • PARI
    a(n) = sum(k=1, primepi(n), (n - sumdigits(n, prime(k))) / (prime(k)-1)); \\ Daniel Suteu, Apr 18 2018
    
  • PARI
    a(n) = my(res = 0); forprime(p = 2, n, cn = n; while(cn > 0, res += (cn \= p))); res \\ David A. Corneth, Apr 27 2018
    
  • Python
    from sympy import factorint as pf
    def aupton(nn):
        alst = [0]
        for n in range(1, nn+1): alst.append(alst[-1] + sum(pf(n).values()))
        return alst
    print(aupton(63)) # Michael S. Branicky, Aug 01 2021

Formula

a(n) = a(n-1) + A001222(n).
A027746(a(A000040(n))+1) = A000040(n). A082288(a(n)+1) = n.
A001221(n!) = omega(n!) = pi(n) = A000720(n).
a(n) = Sum_{i = 1..n} A001222(i). - Jonathan Vos Post, Feb 10 2010
a(n) = n log log n + B_2 * n + o(n), with B_2 = A083342. - Charles R Greathouse IV, Jan 11 2012
a(n) = A210241(n) - n for n > 0. - Reinhard Zumkeller, Mar 23 2012
G.f.: (1/(1 - x))*Sum_{p prime, k>=1} x^(p^k)/(1 - x^(p^k)). - Ilya Gutkovskiy, Mar 15 2017
a(n) = Sum_{k=1..floor(sqrt(n))} k * (A025528(floor(n/k)) - A025528(floor(n/(k+1)))) + Sum_{k=1..floor(n/(floor(sqrt(n))+1))} floor(n/k) * A069513(k). - Daniel Suteu, Dec 21 2018
a(n) = Sum_{prime p<=n} Sum_{k=1..floor(log_p(n))} floor(n/p^k). - Ridouane Oudra, Nov 04 2022
a(n) = Sum_{k=1..n} A069513(k)*floor(n/k). - Ridouane Oudra, Oct 04 2024

Extensions

Typo corrected by Daniel Forgues, Nov 16 2009

A136141 Decimal expansion of Sum_{p prime} 1/(p*(p-1)).

Original entry on oeis.org

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

Views

Author

R. J. Mathar, Mar 09 2008

Keywords

Comments

Excess of prime factors with multiplicity over distinct prime factors for random (large) integers. - Charles R Greathouse IV, Sep 06 2011
Sum of reciprocals of (proper) prime powers. The sum of reciprocals of all proper powers is A072102. - Charles R Greathouse IV, Apr 24 2012
Decimal expansion of the infinite sum of the reciprocals of the prime powers which are not prime (A246547). - Robert G. Wilson v, May 13 2019
See the second 'Applications' example under the Mathematica help file for the function PrimePowerQ. - Robert G. Wilson v, May 13 2019
It easy to prove that this constant < 1 (Sum_{p prime} 1/(p*(p-1)) < Sum_{k>=2} 1/(k*(k-1)) = 1). Luthar (1969) asks for a better upper bound. The solution shows that this constant is < 3/2 - log(2) = 0.80685... . - Amiram Eldar, Feb 14 2025

Examples

			Equals 1/2 + 1/(3*2) + 1/(5*4) + 1/(7*6) + ...
= 0.7731566690497951278643674598559423956187413360831860483110060673567...
		

References

  • Henri Cohen, Number Theory, Volume II: Analytic and Modern Tools, GTM Vol. 240, Springer, 2007; see pp. 208-209.
  • Steven R. Finch, Mathematical Constants, Cambridge Univ. Press, 2003, Meissel-Mertens constants, p. 94.

Crossrefs

Cf. A152447 (over the semiprimes), A000040, A000720, A001248, A046660 (excess, see first comment), A072102, A077761, A083342, A179119, A246547.
Decimal expansion of the prime zeta function: A085548 (at 2), A085541 (at 3), A085964 (at 4) to A085969 (at 9).

Programs

  • Magma
    R := RealField(105);
    c := &+[R|(EulerPhi(n)-MoebiusMu(n))/n*Log(ZetaFunction(R,n)):n in[2..360]];
    Reverse(IntegerToSequence(Floor(c*10^103))); // Jason Kimberley, Jan 12 2017
  • Mathematica
    digits = 103; sp = NSum[PrimeZetaP[n], {n, 2, Infinity}, WorkingPrecision -> digits + 10, NSumTerms -> 2*digits]; RealDigits[sp, 10, digits] // First (* Jean-François Alcover, Sep 02 2015 *)
  • PARI
    W(x)=solve(y=log(x)/2,max(1,log(x)),y*exp(y)-x)
    eps()=2. >> (32*ceil(default(realprecision)/9.63))
    primezeta(s)=my(t=s*log(2),iter=W(t/eps())\t);sum(k=1,iter, moebius(k)/k*log(abs(zeta(k*s))))
    a(lim,e)={ \\ choose parameters to maximize speed and precision
        my(x,y=exp(W(lim)-.5));
        x=lim^e*(e*log(y))^e*(y*log(y))^-e*incgam(-e,e*log(y));
        forprime(p=2,lim,x+=1/((p*1.)^e*(p-1)));
        x+sum(n=2,e,primezeta(n))
    }; \\ Charles R Greathouse IV, Sep 07 2011
    
  • PARI
    sumeulerrat(1/(p*(p-1))) \\ Amiram Eldar, Mar 18 2021
    

Formula

Equals Sum_{n>=1} 1/A036689(n).
Equals Sum_{s>=2} P(s), where P is the prime zeta function. - Charles R Greathouse IV, Sep 06 2011
Equals A083342 - A077761, that is, Sum_{n>=2} ((EulerPhi(n) - MoebiusMu(n))/n) * log(zeta(n)). - Jean-François Alcover, Sep 02 2015
Equals 2 * Sum_{k>=2} pi(k)/(k^3-k), where pi(k) = A000720(k) (Shamos, 2011, p. 8). - Amiram Eldar, Mar 12 2024

Extensions

More terms from D. S. McNeil, Sep 06 2011
More digits from Jean-François Alcover, Sep 02 2015

A087436 Number of odd prime factors of n, counted with repetitions.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Sep 03 2003

Keywords

Comments

Number of parts larger than 1 in the partition with Heinz number n. The Heinz number of an integer partition p = [p_1, p_2, ..., p_r] is defined as Product(p_j-th prime, j=1...r) (concept used by Alois P. Heinz in A215366 as an "encoding" of a partition). Example: a(9) = 2 because the partition with Heinz number 9 (=3*3) is [2,2]. - Emeric Deutsch, Oct 02 2015
Totally additive because both A001222 and A007814 are. a(2) = 0, and a(p) = 1 for odd primes p, a(m*n) = a(m)+a(n) for m, n > 1. - Antti Karttunen, Jul 10 2020

Examples

			a(9) = 2 because 9 = 3*3 has 2 odd prime factors. - _Emeric Deutsch_, Oct 02 2015
		

Crossrefs

Cf. A000244 (the first occurrence of each n, and also the positions of records).

Programs

  • Maple
    seq(bigomega(n) - padic[ordp](n, 2), n=1..102); # Peter Luschny, Dec 06 2017
  • Mathematica
    Join[{0},Table[Length[Select[Flatten[Table[#[[1]],{#[[2]]}]&/@ FactorInteger[ n]],OddQ]],{n,2,110}]] (* Harvey P. Dale, Feb 01 2013 *)
  • PARI
    a(n) = bigomega(n) - valuation(n, 2); \\ Michel Marcus, Sep 10 2019
    
  • PARI
    A087436(n) = (bigomega(n>>valuation(n,2))); \\ Antti Karttunen, Jul 10 2020

Formula

a(n) = A001222(n) - A007814(n).
a(n) = A001222(A000265(n)). - Antti Karttunen, Jul 10 2020
Sum_{k=1..n} a(k) = n * (log(log(n)) + B_2 - 1) + O(n/log(n)), where B_2 = A083342. - Amiram Eldar, May 16 2025

A303279 Expansion of (1/(1 - x)^2) * Sum_{p prime, k>=1} x^(p^k)/(1 - x^(p^k)).

Original entry on oeis.org

0, 1, 3, 7, 12, 19, 27, 38, 51, 66, 82, 101, 121, 143, 167, 195, 224, 256, 289, 325, 363, 403, 444, 489, 536, 585, 637, 692, 748, 807, 867, 932, 999, 1068, 1139, 1214, 1290, 1368, 1448, 1532, 1617, 1705, 1794, 1886, 1981, 2078, 2176, 2279, 2384, 2492, 2602, 2715, 2829, 2947, 3067
Offset: 1

Views

Author

Ilya Gutkovskiy, Apr 20 2018

Keywords

Comments

Sum of exponents in prime-power factorization of product of first n factorials (A000178).
Partial sums of A022559.

Examples

			a(5) = 12 because 2!*3!*4!*5! = 2^8*3^3*5 and 8 + 3 + 1 = 12.
		

Crossrefs

Half of row sums of triangle A356718.

Programs

  • Maple
    b:= proc(n) option remember; `if`(n<1, [0$2],
          (p-> p+[numtheory[bigomega](n), p[1]])(b(n-1)))
        end:
    a:= n-> b(n+1)[2]:
    seq(a(n), n=1..55);  # Alois P. Heinz, Oct 07 2021
  • Mathematica
    nmax = 55; Rest[CoefficientList[Series[1/(1 - x)^2 Sum[Boole[PrimePowerQ[k]] x^k/(1 - x^k), {k, 1, nmax}], {x, 0, nmax}], x]]
    Table[PrimeOmega[BarnesG[n + 2]], {n, 55}]
    Table[ Sum[ PrimeOmega@ j, {k, n}, {j, k}], {n, 55}]
  • PARI
    a(n) = my(t=0); sum(k=1, n, t+=bigomega(k)); \\ Daniel Suteu, Jan 17 2019

Formula

a(n) = (n^2/2) * (log(log(n)) + c + O(1/log(n))), where c = A083342 (De Koninck and Verreault, 2024, p. 49, eq. (3.1)). - Amiram Eldar, Dec 10 2024
a(n) = (1/2) * Sum_{k=0..n} A356718(n,k). - Dario T. de Castro, Feb 19 2025

A350387 a(n) is the sum of the odd exponents in the prime factorization of n.

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, 5, 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, 0, 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, 6, 1, 1, 1, 0, 1, 3, 1, 4, 3
Offset: 1

Views

Author

Amiram Eldar, Dec 28 2021

Keywords

Comments

First differs from A125073 at n = 32.
a(n) is the number of prime divisors of n, counted with multiplicity, with an odd exponent in the prime factorization of n.

Crossrefs

Programs

  • Mathematica
    f[p_, e_] := If[OddQ[e], e, 0]; a[1] = 0; a[n_] := Plus @@ f @@@ FactorInteger[n]; Array[a, 100]
  • PARI
    a(n) = my(f=factor(n)); sum(k=1, #f~, if (f[k,2] %2, f[k,2])); \\ Michel Marcus, Dec 28 2021
  • Python
    from sympy import factorint
    def a(n): return sum(e for e in factorint(n).values() if e%2 == 1)
    print([a(n) for n in range(1, 106)]) # Michael S. Branicky, Dec 28 2021
    

Formula

Additive with a(p^e) = e if e is odd and 0 otherwise.
a(n) = A001222(A350389(n)).
a(n) = 0 if and only if n is a positive square (A000290 \ {0}).
a(n) = A001222(n) - A350386(n).
a(n) = A001222(n) if and only if n is an exponentially odd number (A268335).
Sum_{k=1..n} a(k) = n * log(log(n)) + c * n + O(n/log(n)), where c = A083342 - Sum_{p prime} 2*p/((p-1)*(p+1)^2) = gamma + Sum_{p prime} (log(1-1/p) + (p^2+1)/((p-1)*(p+1)^2)) = 0.2384832800... and gamma is Euler's constant (A001620).

A361205 a(n) = 2*omega(n) - bigomega(n).

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Mar 16 2023

Keywords

Crossrefs

Without doubling omega we have -A046660.
Positions of 0's are A067801, counted by A239959.
Positions of negative terms are A360558, counted by A360254.
Positions of nonpositive terms are A361204, counted by A237363.
Positions of positive terms are A361393, counted by A237365.
Positions of nonnegative terms are A361395, counted by A361394.
A001221 (omega) counts distinct prime factors.
A001222 (bigomega) counts prime factors.
A112798 lists prime indices, sum A056239.

Programs

  • Mathematica
    Table[2*PrimeNu[n]-PrimeOmega[n],{n,100}]

Formula

Additive with a(p^e) = 2 - e. - Amiram Eldar, Mar 26 2023
Sum_{k=1..n} a(k) = n * log(log(n)) + c * n + O(n/log(n)), where c = 2*A077761 - A083342 = A077761 - A136141 = -0.511659... . - Amiram Eldar, Oct 01 2023

A080256 Sum of numbers of distinct and of all prime factors of n.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Feb 10 2003

Keywords

Comments

a(n) = 2 iff n is prime, A000040; a(n) > 2 iff n is composite, A002808; a(n) <= 3 iff n is prime or square of prime, A000430; a(n) = 3 iff n is square of prime, A001248; a(A080257(n)) > 3;
a(n) <= 4 iff product of proper divisors <= n^2, A007964; a(n) = 4 iff n has four divisors, A030513; a(n) > 4 iff product of proper divisors > n^2, A058080; a(A064598(n)) <= 5; a(A080258(n)) = 5.

Crossrefs

Programs

  • Mathematica
    f[n_] := Plus @@ (Last /@ FactorInteger[n] + 1); Table[ f[n], {n, 105}] (* Robert G. Wilson v, Aug 03 2005 *)
  • PARI
    a(n) = {my(f = factor(n)); omega(f) + bigomega(f);} \\ Amiram Eldar, Sep 28 2023

Formula

a(n) = Omega(n) + omega(n) = A001221(n) + A001222(n).
Additive with a(p^e) = e + 1.
Sum_{k=1..n} a(k) = 2 * n * log(log(n)) + c * n + O(n/log(n)), where c = A077761 + A083342 = 1.29615109474508069537... . - Amiram Eldar, Sep 28 2023

A076399 Number of prime factors of n-th perfect power (with repetition).

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Oct 09 2002

Keywords

Crossrefs

Programs

  • Haskell
    a076399 n = a001222 (a025478 n) * a025479 n
    -- Reinhard Zumkeller, Mar 28 2014
    
  • Mathematica
    PrimeOmega[Select[Range[10^4], # == 1 || GCD @@ FactorInteger[#][[;; , 2]] > 1 &]] (* Amiram Eldar, Feb 18 2023 *)
  • PARI
    is(n) = n==1 || ispower(n);
    apply(bigomega, select(is, [1..5000])) \\ Amiram Eldar, Feb 18 2023
    
  • Python
    from sympy import mobius, integer_nthroot, primeomega
    def A076399(n):
        def f(x): return int(n-2+x+sum(mobius(k)*(integer_nthroot(x,k)[0]-1) for k in range(2,x.bit_length())))
        kmin, kmax = 1,2
        while f(kmax) >= kmax:
            kmax <<= 1
        while True:
            kmid = kmax+kmin>>1
            if f(kmid) < kmid:
                kmax = kmid
            else:
                kmin = kmid
            if kmax-kmin <= 1:
                break
        return int(primeomega(kmax)) # Chai Wah Wu, Aug 14 2024

Formula

a(n) = A001222(A001597(n)).
a(n) = A001222(A025478(n))*A025479(n).
Sum_{A001597(k) <= x} a(k) = 2*sqrt(x)*log(log(x)) + 2*(B_2 - log(2))*sqrt(x) + O(sqrt(x)/log(x)), where B_2 = A083342 (Jakimczuk and Lalín, 2022). - Amiram Eldar, Feb 18 2023, corrected Sep 21 2024

A210241 Partial sums of A073093.

Original entry on oeis.org

1, 3, 5, 8, 10, 13, 15, 19, 22, 25, 27, 31, 33, 36, 39, 44, 46, 50, 52, 56, 59, 62, 64, 69, 72, 75, 79, 83, 85, 89, 91, 97, 100, 103, 106, 111, 113, 116, 119, 124, 126, 130, 132, 136, 140, 143, 145, 151, 154, 158, 161, 165, 167, 172, 175, 180, 183, 186, 188
Offset: 1

Views

Author

Reinhard Zumkeller, Mar 19 2012

Keywords

Comments

Number of terms in the first n rows of triangle A210208.

Crossrefs

Programs

  • Haskell
    a210241 n = a210241_list !! (n-1)
    a210241_list = scanl1 (+) a073093_list
  • Mathematica
    Accumulate[Array[PrimeOmega[#] + 1 &, 100]] (* Amiram Eldar, Apr 05 2025 *)

Formula

a(n) = A022559(n) + n.
a(n) = n * (log(log(n)) + B_2 + 1) + O(n/log(n)), where B_2 = A083342. - Amiram Eldar, Apr 05 2025

A349326 a(n) is the number of prime powers (not including 1) that are bi-unitary divisors of n.

Original entry on oeis.org

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

Views

Author

Amiram Eldar, Nov 15 2021

Keywords

Comments

The total number of prime powers (not including 1) that divide n is A001222(n).
The least number k such that a(k) = m is A122756(m).

Examples

			12 has 4 bi-unitary divisors, 1, 3, 4 and 12. Two of these divisors, 3 and 4 = 2^2 are prime powers. Therefore a(12) = 2.
		

Crossrefs

Programs

  • Mathematica
    f[p_, e_] := If[OddQ[e], e, e - 1]; a[1] = 0; a[n_] := Plus @@ f @@@ FactorInteger[n]; Array[a, 100]
  • PARI
    a(n) = vecsum(apply(x -> if(x%2, x, x-1), factor(n)[, 2])); \\ Amiram Eldar, Sep 29 2023

Formula

Additive with a(p^e) = e if e is odd, and e-1 if e is even.
a(n) <= A001222(n), with equality if and only if n is an exponentially odd number (A268335).
a(n) <= A286324(n) - 1, with equality if and only if n is a prime power (including 1, A000961).
a(n) = A001222(n) - A162641(n). - Amiram Eldar, May 18 2023
From Amiram Eldar, Sep 29 2023: (Start)
a(n) = A001222(A350390(n)) (the number of prime factors of the largest exponentially odd number dividing n, counted with multiplicity).
Sum_{k=1..n} a(k) ~ n * (log(log(n)) + B_2 - C), where B_2 = A083342 and C = A179119. (End)
Showing 1-10 of 14 results. Next