OFFSET
0,3
COMMENTS
LINKS
Adam Hugill, Table of n, a(n) for n = 0..10000 (terms 0..999 from G. C. Greubel)
FORMULA
Conjecture: a(n) = round(n*(log(n) + gamma) + 1/2) for n > 0, where gamma = A001620. - Ilya Gutkovskiy, Oct 31 2016
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
EXAMPLE
a(0) = 0 since nothing needs to be bought if nothing is to be collected.
a(1) = 1 since only 1 box needs to be bought if only 1 object is to be collected.
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.
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.
MAPLE
seq(round(n*harmonic(n)), n=1..100); # Robert Israel, Oct 31 2016
MATHEMATICA
Table[Round[n*Sum[1/k, {k, 1, n}]], {n, 0, 25}] (* G. C. Greubel, Oct 29 2016 *)
PROG
(PARI) A135736(n)=round(n*sum(i=1, n, 1/i))
(Python)
n=100 #set the number of terms you want to calculate here
ans=0
finalans = []
finalans.append(0) #continuity with A135736
for i in range(1, n+1):
ans+=(1/i)
finalans.append(int(round(ans*i)))
print(finalans)
# Adam Hugill, Feb 14 2022
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
M. F. Hasler, Nov 29 2007
STATUS
approved