login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A135736 Nearest integer to n*Sum_{k=1..n} 1/k = rounded expected coupon collection numbers. 2

%I #47 Feb 16 2022 18:38:46

%S 0,1,3,6,8,11,15,18,22,25,29,33,37,41,46,50,54,58,63,67,72,77,81,86,

%T 91,95,100,105,110,115,120,125,130,135,140,145,150,155,161,166,171,

%U 176,182,187,192,198,203,209,214,219,225,230,236,242,247,253,258,264,269,275

%N Nearest integer to n*Sum_{k=1..n} 1/k = rounded expected coupon collection numbers.

%C Somewhat more realistic than A052488 but more optimistic than A060293, the expected number of boxes that must be bought to get the full collection of N objects, if each box contains any one of them at random. See also comments in A060293, A052488.

%H Adam Hugill, <a href="/A135736/b135736.txt">Table of n, a(n) for n = 0..10000</a> (terms 0..999 from G. C. Greubel)

%F a(n) = round(n*A001008(n)/A002805(n)) = either A052488(n) or A060293(n).

%F a(n) ~ A060293(n) ~ A052488(n) ~ A050502(n) ~ A050503(n) ~ A050504(n) (asymptotically)

%F Conjecture: a(n) = round(n*(log(n) + gamma) + 1/2) for n > 0, where gamma = A001620. - _Ilya Gutkovskiy_, Oct 31 2016

%F The conjecture is false: a(2416101) = 36905656 while round(2416101*(log(2416101) + gamma) + 1/2) = 36905657, with the unrounded numbers being 36905656.499999982... and 36905656.500000016.... Heuristically this should happen infinitely often. - _Charles R Greathouse IV_, Oct 31 2016

%e a(0) = 0 since nothing needs to be bought if nothing is to be collected.

%e a(1) = 1 since only 1 box needs to be bought if only 1 object is to be collected.

%e a(2) = 3 since the chance of getting the other object at the second purchase is only 1/2, so it takes 2 boxes on the average to get it.

%e a(3) = 6 since the chance of getting a new object at the second purchase is 2/3 so it takes 3/2 boxes in the mean, then the chance becomes 1/3 to get the 3rd, i.e., 3 other boxes on the average to get the full collection and the rounded value of 1 + 3/2 + 3 = 11/2 = 5.5 is 6.

%p seq(round(n*harmonic(n)), n=1..100); # _Robert Israel_, Oct 31 2016

%t Table[Round[n*Sum[1/k, {k, 1, n}]], {n,0,25}] (* _G. C. Greubel_, Oct 29 2016 *)

%o (PARI) A135736(n)=round(n*sum(i=1,n,1/i))

%o (Python)

%o n=100 #set the number of terms you want to calculate here

%o ans=0

%o finalans = []

%o finalans.append(0) #continuity with A135736

%o for i in range(1, n+1):

%o ans+=(1/i)

%o finalans.append(int(round(ans*i)))

%o print(finalans)

%o # _Adam Hugill_, Feb 14 2022

%Y Cf. A060293, A052488, A050502-A050504.

%K easy,nonn

%O 0,3

%A _M. F. Hasler_, Nov 29 2007

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 2 19:04 EDT 2024. Contains 372203 sequences. (Running on oeis4.)