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.

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.

This page as a plain text file.
%I A060293 #37 Feb 16 2022 18:37:12
%S A060293 0,1,3,6,9,12,15,19,22,26,30,34,38,42,46,50,55,59,63,68,72,77,82,86,
%T A060293 91,96,101,106,110,115,120,125,130,135,141,146,151,156,161,166,172,
%U A060293 177,182,188,193,198,204,209,215,220,225,231,236,242,248,253,259,264,270
%N 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.
%H A060293 Robert Israel, <a href="/A060293/b060293.txt">Table of n, a(n) for n = 0..10000</a>
%H A060293 R. Wyss, <a href="http://dx.doi.org/10.5169/seals-46962">Identitäten bei den Stirling-Zahlen 2. Art aus kombinatorischen Überlegungen beim Würfelspiel</a>, Elem. Math. 51 (1996) 102-106, Eq (5). [From _R. J. Mathar_, Aug 02 2009]
%F A060293 a(n) = ceiling(n*Sum_{k=1..n}(1/k)) = ceiling(n*A001008(n)/A002805(n)) = A052488(n) + 1 for n>2.
%e A060293 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.
%p A060293 H := proc(n)
%p A060293     add(1/k,k=1..n) ;
%p A060293 end proc:
%p A060293 A060293 := proc(n)
%p A060293     ceil(n*H(n)) ;
%p A060293 end proc: # _R. J. Mathar_, Aug 02 2009, Dec 02 2016
%p A060293 A060293:= n -> ceil(Psi(n+1)+gamma); # _Robert Israel_, May 19 2014
%t A060293 f[n_] := Ceiling[n*HarmonicNumber[n]]; Array[f, 60, 0] (* _Robert G. Wilson v_, Nov 23 2015 *)
%o A060293 (PARI) vector(100, n, n--; ceil(n*sum(k=1, n, 1/k))) \\ _Altug Alkan_, Nov 23 2015
%o A060293 (Python)
%o A060293 from math import ceil
%o A060293 n=100 #number of terms
%o A060293 ans=0
%o A060293 finalans = [0]
%o A060293 for i in range(1, n+1):
%o A060293     ans+=(1/i)
%o A060293     finalans.append(ceil(ans*i))
%o A060293 print(finalans)
%o A060293 # _Adam Hugill_, Feb 14 2022
%Y A060293 Cf. A052488.
%K A060293 easy,nonn
%O A060293 0,3
%A A060293 _Henry Bottomley_, Mar 24 2001