All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Numbers > Sequences
Term Finding with Floor (Posted on 2016-06-09) Difficulty: 3 of 5
A sequence {S(n)} is defined as:
S(1) = 1, and:
S(n+1)= S(n)+ floor(S(n)/n) + 2,
for n = 1,2,3,. ....

Find S(2016)

No Solution Yet Submitted by K Sengupta    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Manual approach | Comment 2 of 3 |
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) ((a-1)+3)*2^(a-1)   
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 2016-06-12 06:31:43

Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (3)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2017 by Animus Pactum Consulting. All rights reserved. Privacy Information