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 11-20 of 98 results. Next

A013939 Partial sums of sequence A001221 (number of distinct primes dividing n).

Original entry on oeis.org

0, 1, 2, 3, 4, 6, 7, 8, 9, 11, 12, 14, 15, 17, 19, 20, 21, 23, 24, 26, 28, 30, 31, 33, 34, 36, 37, 39, 40, 43, 44, 45, 47, 49, 51, 53, 54, 56, 58, 60, 61, 64, 65, 67, 69, 71, 72, 74, 75, 77, 79, 81, 82, 84, 86, 88, 90, 92, 93, 96, 97, 99, 101, 102, 104, 107, 108, 110, 112
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Haskell
    a013939 n = a013939_list !! (n-1)
    a013939_list = scanl1 (+) $ map a001221 [1..]
    -- Reinhard Zumkeller, Feb 16 2012
    
  • Magma
    [(&+[Floor(n/NthPrime(k)): k in [1..n]]): n in [1..70]]; // G. C. Greubel, Nov 24 2018
    
  • Maple
    A013939 := proc(n) option remember;  `if`(n = 1, 0, a(n) + iquo(n+1, ithprime(n+1))) end:
    seq(A013939(i), i = 1..69);  # Peter Luschny, Jul 16 2011
  • Mathematica
    a[n_] := Sum[Floor[n/Prime[k]], {k, 1, n}]; Table[a[n], {n, 1, 69}] (* Jean-François Alcover, Jun 11 2012, from 2nd formula *)
    Accumulate[PrimeNu[Range[120]]] (* Harvey P. Dale, Jun 05 2015 *)
  • PARI
    t=0;vector(99,n,t+=omega(n)) \\ Charles R Greathouse IV, Jan 11 2012
    
  • PARI
    a(n)=my(s);forprime(p=2,n,s+=n\p);s \\ Charles R Greathouse IV, Jan 11 2012
    
  • PARI
    a(n) = sum(k=1, sqrtint(n), k * (primepi(n\k) - primepi(n\(k+1)))) + sum(k=1, n\(sqrtint(n)+1), if(isprime(k), n\k, 0)); \\ Daniel Suteu, Nov 24 2018
    
  • Python
    from sympy.ntheory import primefactors
    print([sum(len(primefactors(k)) for k in range(1,n+1)) for n in range(1, 121)]) # Indranil Ghosh, Mar 19 2017
    
  • Python
    from sympy import primerange
    def A013939(n): return sum(n//p for p in primerange(n+1)) # Chai Wah Wu, Oct 06 2024
    
  • Sage
    [sum(floor(n/nth_prime(k)) for k in (1..n)) for n in (1..70)] # G. C. Greubel, Nov 24 2018

Formula

a(n) = Sum_{k <= n} omega(k).
a(n) = Sum_{k = 1..n} floor( n/prime(k) ).
a(n) = a(n-1) + A001221(n).
a(n) = A093614(n) - A048865(n); see also A006218.
A027748(a(A000040(n))+1) = A000040(n), A082287(a(n)+1) = n.
a(n) = Sum_{k=1..n} pi(floor(n/k)). - Vladeta Jovovic, Jun 18 2006
a(n) = n log log n + O(n). - Charles R Greathouse IV, Jan 11 2012
a(n) = n*(log log n + B) + o(n), where B = 0.261497... is the Mertens constant A077761. - Arkadiusz Wesolowski, Oct 18 2013
G.f.: (1/(1 - x))*Sum_{k>=1} x^prime(k)/(1 - x^prime(k)). - Ilya Gutkovskiy, Jan 02 2017
a(n) = Sum_{k=1..floor(sqrt(n))} k * (pi(floor(n/k)) - pi(floor(n/(k+1)))) + Sum_{p prime <= floor(n/(1+floor(sqrt(n))))} floor(n/p). - Daniel Suteu, Nov 24 2018
a(n) = Sum_{k>=1} k * A346617(n,k). - Alois P. Heinz, Aug 19 2021
a(n) = A001222(A048803(n+1)). - Flávio V. Fernandes, Jan 14 2025

Extensions

More terms from Henry Bottomley, Jul 03 2001

A046072 Decompose multiplicative group of integers modulo n as a product of cyclic groups C_{k_1} x C_{k_2} x ... x C_{k_m}, where k_i divides k_j for i < j; then a(n) = m.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

The multiplicative group modulo n can be written as the direct product of a(n) (but not fewer) cyclic groups. - Joerg Arndt, Dec 25 2014
a(n) = 1 (that is, the multiplicative group modulo n is cyclic) iff n is in A033948, or equivalently iff A034380(n)=1. - Max Alekseyev, Jan 07 2015
This sequence gives the minimal number of generators of the multiplicative group of integers modulo n which is isomorphic to the Galois group Gal(Q(zeta_n)/Q), with zeta_n =exp(2*Pi*I/n). See, e.g., Theorem 9.1.11., p. 235 of the Cox reference. See also the table of the Wikipedia link. - Wolfdieter Lang, Feb 28 2017
In this factorization the trivial group C_1 = {1} is allowed as a factor only for n = 0 and 1 (otherwise one could have arbitrarily many leading C_1 factors for n >= 3). - Wolfdieter Lang, Mar 07 2017

References

  • David A. Cox, Galois Theory, John Wiley & Sons, Hoboken, New Jrsey, 2004, 235.
  • Daniel Shanks, Solved and Unsolved Problems in Number Theory, 4th ed. New York: Chelsea, pp. 92-93, 1993.

Crossrefs

Cf. A001221, A046073 (number of squares in multiplicative group modulo n), A077761, A281855, A282625 (for total factorization).
a(n)=k iff n is in: A033948 (k=1), A272592 (k=2), A272593 (k=3), A272594 (k=4), A272595 (k=5), A272596 (k=6), A272597 (k=7), A272598 (k=8), A272599 (k=9).

Programs

  • Mathematica
    f[n_] := Which[OddQ[n], PrimeNu[n], EvenQ[n] && ! IntegerQ[n/4],
      PrimeNu[n] - 1, IntegerQ[n/4] && ! IntegerQ[n/8], PrimeNu[n],
      IntegerQ[n/8], PrimeNu[n] + 1]; Join[{1, 1},
    Table[f[n], {n, 3, 102}]] (* Geoffrey Critzer, Dec 24 2014 *)
  • PARI
    a(n)=if(n<=2, 1, #znstar(n)[3]); \\ Joerg Arndt, Aug 26 2014

Formula

a(n) = A001221(n) - 1 if n > 2 is divisible by 2 and not by 4, a(n) = A001221(n) + 1 if n is divisible by 8, a(n) = A001221(n) in other cases. - Ivan Neretin, Aug 01 2016
Sum_{k=1..n} a(k) = n * (log(log(n)) + B - 1/8) + O(n/log(n)), where B is Mertens's constant (A077761). - Amiram Eldar, Sep 21 2024

A162642 Number of odd exponents in the canonical prime factorization of n.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Jul 08 2009

Keywords

Comments

a(n) is also known as the squarefree rank of n. - Jason Kimberley, Jul 08 2017
The number of primes that are infinitary divisors of n. - Amiram Eldar, Oct 01 2023

Crossrefs

Programs

Formula

a(n) = A001221(n) - A162641(n).
a(n) = A001221(A007913(n)). - Jason Kimberley, Jan 06 2016
a(A000290(n)) = 0, n > 0. - Michel Marcus, Jan 08 2016
G.f.: Sum_{i>=1} Sum_{j>=1} (-1)^j x^(prime(i)^j)/(x^(prime(i)^j) - 1). - Robert Israel, Jan 15 2016
From Antti Karttunen, Nov 28 2017: (Start)
Additive with a(p^e) = A000035(e).
a(n) = A056169(n) + A295662(n).
A056169(n) <= a(n) <= A056169(n) + A295659(n).
a(n) <= A295664(n).
(End)
Sum_{k=1..n} a(k) = n * log(log(n)) + c * n + O(n/log(n)), where c = gamma + Sum_{p prime} (log(1-1/p) + 1/(p+1)) = A077761 - A179119 = -0.0687327134... and gamma is Euler's constant (A001620). - Amiram Eldar, Dec 25 2021

A033273 Number of nonprime divisors of n.

Original entry on oeis.org

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

Views

Author

Keywords

Crossrefs

Programs

Formula

a(n) = A000005(n) - A001221(n).
a((n)) = n and a(m) <> n for m < A055079(n). - Reinhard Zumkeller, Dec 16 2013
G.f.: Sum_{k>=1} (x^k - x^prime(k))/((1 - x^k)*(1 - x^prime(k))). - Ilya Gutkovskiy, Jan 17 2017
Dirichlet g.f.: zeta(s)*(zeta(s)-primezeta(s)). - Benedict W. J. Irwin, Jul 11 2018
Sum_{k=1..n} a(k) ~ n*log(n) - n*log(log(n)) + (2*gamma - 1 - B)*n, where gamma is Euler's constant (A001620) and B is Mertens's constant (A077761). - Amiram Eldar, Nov 27 2022

Extensions

More terms from Reinhard Zumkeller, Sep 02 2003
Corrected error in offset. - Jaroslav Krizek, May 04 2009
Extended by Ray Chandler, Aug 07 2010

A005087 Number of distinct odd primes dividing n.

Original entry on oeis.org

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

Views

Author

Keywords

Crossrefs

Positions of zeros: A000079.
Positions of ones: A336101.

Programs

  • Haskell
    a005087 n = a001221 n + n `mod` 2 - 1 -- Reinhard Zumkeller, Feb 28 2014
    
  • Mathematica
    nn=100; a=Sum[x^p/(1-x^p), {p, Table[Prime[n],{n,2,nn}]}]; Drop[CoefficientList[Series[a, {x,0,nn}],x],1] (* Geoffrey Critzer, Nov 06 2012 *)
    Array[PrimeNu[#] - Boole[EvenQ[#]] &, 102] (* Lei Zhou, Dec 03 2012 *)
  • PARI
    a(n) = if (n%2, omega(n), omega(n)-1); \\ Michel Marcus, Sep 18 2023
  • Python
    from sympy import primefactors
    def A005087(n): return len(primefactors(n))+(n&1)-1 # Chai Wah Wu, Jul 07 2022
    
  • Sage
    def A005087(n) : return len(prime_divisors(n)) + n % 2 - 1
    [A005087(n) for n in (1..80)]  # Peter Luschny, Feb 01 2012
    

Formula

Additive with a(p^e) = 0 if p = 2, 1 otherwise.
a(n) = A001221(n) - 1 + n mod 2. - Reinhard Zumkeller, Sep 03 2003
O.g.f.: Sum_{p=odd prime} x^p/(1-x^p). - Geoffrey Critzer, Nov 06 2012
Sum_{k=1..n} a(k) = n * log(log(n)) + c * n + O(n/log(n)), where c = A077761 - 1/2 = -0.238502... . - Amiram Eldar, Sep 28 2023

Extensions

More terms from Reinhard Zumkeller, Sep 03 2003

A316523 Number of odd multiplicities minus number of even multiplicities in the canonical prime factorization of n.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Jul 05 2018

Keywords

Crossrefs

Cf. A187039 (where a(n)=0). - Michel Marcus, Jul 08 2018

Programs

  • Maple
    f:= proc(n) local F;
      F:= map(t -> t[2],ifactors(n)[2]);
      2*nops(select(type,F,odd))-nops(F);
    end proc:
    map(f, [$1..100]); # Robert Israel, Aug 27 2018
  • Mathematica
    Table[Total[-(-1)^If[n==1,{},FactorInteger[n][[All,2]]]],{n,100}]
  • PARI
    a(n) = my(f=factor(n)); -sum(k=1, #f~, (-1)^(f[k,2])); \\ Michel Marcus, Jul 08 2018; corrected Jun 13 2022

Formula

If i and j are coprime, a(i*j) = a(i)+a(j). - Robert Israel, Aug 27 2018
From Amiram Eldar, Oct 05 2023: (Start)
Additive with a(p^e) = (-1)^(e+1).
a(n) = A162642(n) - A162641(n).
Sum_{k=1..n} a(k) = n * log(log(n)) + c * n + O(n/log(n)), where c = A077761 - 2*A179119 = -0.398962... . (End)

A046645 a(n) = log_2(A046644(n)); also the 2-adic valuation of A046644(n).

Original entry on oeis.org

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

Views

Author

Keywords

Comments

A268375 gives numbers n for which a(n) = A289617(n) = A005187(A001222(n)). - Antti Karttunen, Jul 08 2017

Crossrefs

Programs

Formula

a(n) = A007814(A046644(n)). - Michel Marcus, Apr 16 2015
Additive with a(p^n) = A005187(n). - Antti Karttunen, Jul 08 2017
a(n) = A293447(A293442(n)). - Antti Karttunen, Nov 10 2017
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) = 1.410258867603361890498..., where f(x) = -x + Sum_{k>=0} (2^(k+1)-1)*x^(2^k)/(1+x^(2^k)). - Amiram Eldar, Sep 29 2023

A083399 Number of divisors of n that are not divisors of other divisors of n.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Jun 12 2003

Keywords

Comments

a(n) <= tau(n); a(n) = tau(n) iff n is prime or n=1 (A008578, A000040); a(n)=tau(n)-1 iff n is semiprime (A001358).
Number of noncomposite divisors of n, (cf. A008578). - Jaroslav Krizek, Nov 25 2009
From Wilf A. Wilson, Jul 21 2017: (Start)
a(n) is the number of maximal subsemigroups of the annular Jones monoid of degree n.
a(n) is the number of maximal subsemigroups of the monoid of orientation-preserving mappings on a set with n elements.
a(n) + 1 is the number of maximal subsemigroups of the monoid of orientation-preserving partial mappings on a set with n elements.
(End)
This is the restricted growth sequence transform of A001221 (and thus also of A007875, A034444, A082476, A292586 and many other sequences). This follows from the formula a(n) = 1+A001221(n), and from the fact that for any n, A001221(n) <= 1+A001221(k) for all k = 1..(n-1). A067003 gives the ordinal transform of A001221. See also A292582, A292583, A292585. - Antti Karttunen, Sep 25 2017

Examples

			{1,2,3,4,6,8,12,24} are the divisors of n=24: 1, 2, 3, 4 and 6 divide not only 24, but also 8 or 12, therefore a(24) = 3.
{1,2,3,4,6,8,12,24} are the divisors of n=24: 1, 2 and 3 are noncomposites, therefore a(24) = 3. - _Jaroslav Krizek_, Nov 25 2009
		

Crossrefs

Programs

Formula

a(n) = omega(n) + 1, where omega = A001221.
a(n) = tau(n) - A055212(n) = A000005(n)-A055212(n).
a(n) = A000005(n) - A033273(n) + 1. - Jaroslav Krizek, Nov 25 2009
a(n) = A010553(A007947(n)) = A000005(A000005(A007947(n))) = tau_2(tau_2(rad(n))). - Enrique Pérez Herrero, Jun 25 2010
G.f.: x/(1 - x) + Sum_{k>=1} x^prime(k)/(1 - x^prime(k)). - Ilya Gutkovskiy, Mar 21 2017
Sum_{k=1..n} a(k) = n * (log(log(n)) + B + 1) + O(n/log(n)), where B is Mertens's constant (A077761). - Amiram Eldar, Sep 29 2024

A083342 Decimal expansion of average deviation of the total number of prime factors.

Original entry on oeis.org

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

Views

Author

Eric W. Weisstein, Sep 25 2003

Keywords

Comments

Or, decimal expansion of constant B2 from the summatory function of the restricted divisor function.
The constant A in the asymptotic formula Sum_{prime p <= n} 1/(p-1) = log(log(n)) + A + O(1/log(n)) (Jakimczuk, 2017). - Amiram Eldar, Mar 18 2024

Examples

			1.03465388189743791161979429846463825467030798434438525450307...
		

References

  • Steven R. Finch, Mathematical Constants, Encyclopedia of Mathematics and its Applications, Vol. 94, Cambridge University Press, 2003, pp. 94-98.
  • József Sándor and Borislav Crstici, Handbook of Number Theory II, Kluwer Academic Publishers, 2004, p. 155, Chapter V, 1) b).

Crossrefs

Programs

  • Mathematica
    digits = 102; Mp = EulerGamma - NSum[PrimeZetaP[n]/n - PrimeZetaP[n], {n, 2, Infinity}, WorkingPrecision -> digits + 10, NSumTerms -> 3*digits]; RealDigits[Mp, 10, digits] // First (* Jean-François Alcover, Sep 02 2015 *)

Formula

Equals A077761 + A136141. - Jean-François Alcover, Sep 02 2015
Equals gamma + Sum_{p prime} (log(1-1/p) + 1/(p-1)), where gamma is Euler's constant (A001620). - Amiram Eldar, Dec 25 2021
From Amiram Eldar, Mar 18 2024: (Start)
Equals gamma + Sum_{k>=2} phi(k) * log(zeta(k)) / k, where phi = A000010.
Equals gamma - Sum_{p prime} 1/(p-1)^2 + Sum_{k>=2} J_2(k) * log(zeta(k)) / k, where J_2 = A007434.
Both formulas are from Jakimczuk (2017). (End)

A295664 Exponent of the highest power of 2 dividing number of divisors of n: a(n) = A007814(A000005(n)); 2-adic valuation of tau(n).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Nov 28 2017

Keywords

Comments

In the prime factorization of n = p1^e1 * ... pk^ek, add together the number of trailing 1-bits in each exponent e when they are written in binary.

Crossrefs

Cf. A000290 (positions of zeros).

Programs

  • Mathematica
    Table[IntegerExponent[DivisorSigma[0, n], 2], {n, 120}] (* Michael De Vlieger, Nov 28 2017 *)
  • PARI
    a(n) = valuation(numdiv(n), 2); \\ Michel Marcus, Nov 30 2017
    
  • Python
    from sympy import divisor_count
    def A295664(n): return (~(m:=int(divisor_count(n))) & m-1).bit_length() # Chai Wah Wu, Jul 05 2022

Formula

Additive with a(p^e) = A007814(1+e).
a(1) = 0; for n > 1, a(n) = A007814(1+A067029(n)) + a(A028234(n)).
a(n) = A007814(A000005(n)).
a(n) >= A162642(n) >= A056169(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.223720656976344505701..., where f(x) = -x + (1-x) * Sum_{k>=1} x^(2^k-1)/(1-x^(2^k)). - Amiram Eldar, Sep 28 2023
Previous Showing 11-20 of 98 results. Next