A060293 Expected coupon collection numbers rounded up; i.e., if aiming to collect a set of n coupons, the expected number of random coupons required to receive the full set.
0, 1, 3, 6, 9, 12, 15, 19, 22, 26, 30, 34, 38, 42, 46, 50, 55, 59, 63, 68, 72, 77, 82, 86, 91, 96, 101, 106, 110, 115, 120, 125, 130, 135, 141, 146, 151, 156, 161, 166, 172, 177, 182, 188, 193, 198, 204, 209, 215, 220, 225, 231, 236, 242, 248, 253, 259, 264, 270
Offset: 0
Examples
a(2)=3 since the probability of getting both coupons after two is 1/2, after 3 is 1/4, after 4 is 1/8, etc. and 2/2 + 3/2^2 + 4/2^3 + ... = 3.
Links
- Robert Israel, Table of n, a(n) for n = 0..10000
- R. Wyss, Identitäten bei den Stirling-Zahlen 2. Art aus kombinatorischen Überlegungen beim Würfelspiel, Elem. Math. 51 (1996) 102-106, Eq (5). [From _R. J. Mathar_, Aug 02 2009]
Crossrefs
Cf. A052488.
Programs
-
Maple
H := proc(n) add(1/k,k=1..n) ; end proc: A060293 := proc(n) ceil(n*H(n)) ; end proc: # R. J. Mathar, Aug 02 2009, Dec 02 2016 A060293:= n -> ceil(Psi(n+1)+gamma); # Robert Israel, May 19 2014
-
Mathematica
f[n_] := Ceiling[n*HarmonicNumber[n]]; Array[f, 60, 0] (* Robert G. Wilson v, Nov 23 2015 *)
-
PARI
vector(100, n, n--; ceil(n*sum(k=1, n, 1/k))) \\ Altug Alkan, Nov 23 2015
-
Python
from math import ceil n=100 #number of terms ans=0 finalans = [0] for i in range(1, n+1): ans+=(1/i) finalans.append(ceil(ans*i)) print(finalans) # Adam Hugill, Feb 14 2022