login
This site is supported by donations to The OEIS Foundation.

 

Logo

Annual appeal: Please make a donation to keep the OEIS running! Over 6000 articles have referenced us, often saying "we discovered this result with the help of the OEIS".
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A013939 Partial sums of sequence A001221 (number of distinct primes dividing n). 22
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 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

COMMENTS

a(n) = A093614(n) - A048865(n); see also A006218.

A027748(a(A000040(n))+1) = A000040(n), A082287(a(n)+1) = n.

LINKS

Charles R Greathouse IV, Table of n, a(n) for n = 1..10000

Eric Weisstein's World of Mathematics, Distinct Prime Factors

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) = 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

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 *)

PROG

(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

(Haskell)

a013939 n = a013939_list !! (n-1)

a013939_list = scanl1 (+) $ map a001221 [1..]

-- Reinhard Zumkeller, Feb 16 2012

(Python)

from sympy.ntheory import primefactors

print [sum([len(primefactors(k)) for k in range(1, n+1)]) for n in xrange(1, 121)] # Indranil Ghosh, Mar 19 2017

CROSSREFS

Cf. A005187, A006218, A011371, A013936.

Cf. A022559.

Cf. A077761.

Sequence in context: A008320 A004439 A050126 * A209921 A268377 A201010

Adjacent sequences:  A013936 A013937 A013938 * A013940 A013941 A013942

KEYWORD

nonn,easy,nice

AUTHOR

N. J. A. Sloane, Henri Lifchitz

EXTENSIONS

More terms from Henry Bottomley, Jul 03 2001

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified December 14 21:33 EST 2017. Contains 296020 sequences.