This is an awesome sequence.
Writing down some terms comes out that the second addition of the sequence, I mean: floor(S(n)/n), increases one unity at each 2^a number of terms.
Floor (let for simplicity call it f) changes for n=3,5,9,17,33...
So that when n is between 2^a+1 and 2^(a+1) f is constant and is:
f=a+1 [f. ex. f=4, for n=9,10,11,12,13,14,15,16)]
It's then easy calculate the difference of value between to consecutive terms, placed within the same range "a" of potences of "2":
S(n+1)S(n)= (a+1)+2= a+3
The value of the terms with form n=2^a will be:
S(2^a)=S(1)+sum(1 to a) ((a1)+3)*2^(a1)
This happens to be =(a+1)*2^a.
For ex. S(16)=2^4(4+1)=80
S(1024)=2^10*11=11264
The term 2016 is 992 terms distant from the term 1024, but all the terms between 1025 and 2048 has the same f. [f=floor(S(n)/n)]. The f value in this interval will be 11.
S(2016)=S(1024)+f(1025/2048)*992+2*992=
=11264+11*992+2*992=
24160.
This fortunately matches Charlie's result. Can calculate the same value from S(2048)= 24576 and sustracting 32 (11+2).
Edited on June 12, 2016, 11:18 am
Ps: What complicate this problem and obliged me to edit it more times is that the floor function changes each 2^n number of terms, but the variation occurs at each term of the form 2^n +1. It is convenient to name S(1), S(0) and solve the problem for S(2015).
Edited on June 12, 2016, 2:24 pm

Posted by armando
on 20160612 06:31:43 