OFFSET
0,2
FORMULA
a(n) ~ (e-1)*e^(n-gamma), where e is Euler's number and gamma is the Euler-Mascheroni constant.
Conjecture: a(n) = floor(1/2 + e^(n-gamma+1)) - floor(1/2 + e^(n-gamma)) for n > 1 where e is Euler's number and gamma is the Euler-Mascheroni constant. - Adam Hugill, Nov 06 2022
EXAMPLE
Define H(0)=0, H(k) = Sum_{i=1..k} 1/i for k=1,2,3,...
a(0)=1: To reach n+1 from n=0 requires 1 additional term of the harmonic partial sum: H(0+1) = H(0) + 1/1 = H(1) = 1.
a(1)=3: To reach n+1 from n=1 requires 3 additional terms of the harmonic partial sum: H(1+3) = H(1) + 1/(1+1) + 1/(1+2) + 1/(1+3) = H(4) = 2.08333....
a(2)=7: To reach n+1 from n=2 requires 7 additional terms of the harmonic partial sum: H(4+7) = H(4) + 1/(4+1) + 1/(4+2) + ... + 1/(4+6) + 1/(4+7) = H(11) = 3.01987....
a(3)=20: To reach n+1 from n=3 requires 20 additional terms of the harmonic partial sum: H(11+20) = H(11) + 1/(11+1) + 1/(11+2) + ... + 1/(11+19) + 1/(11+20) = H(31) = 4.02724....
PROG
(R)
#set size of search space
Max=10000000
#initialize sequence to empty
seq=vector(length=0)
#initialize partial sum to 0
partialsum=0
k=1
n=1
for(i in 1:Max){
partialsum=partialsum+1/i
if(partialsum>=n){
seq=c(seq, k)
k=0
n=n+1
}
k=k+1
}
#print sequence numbers below Max
seq
CROSSREFS
First differences of A004080.
KEYWORD
nonn
AUTHOR
Matthew J. Bloomfield, Dec 21 2020
STATUS
approved