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

Home > Numbers > Sequences
Integers only (Posted on 2023-09-25) Difficulty: 2 of 5
Given:
f(x)=Sum[x/n!] for all positive integers n, where the [] brackets define the integer part of x (e.g. [pi]=3)

What is x, if f(x)=1215

See The Solution Submitted by Ady TZIDON    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution Hunting for x | Comment 2 of 6 |
while 1==1
  x=input('x:');
  tot=0;
  for n=1:20
    tot=tot+floor(x/factorial(n));
  end
  disp(tot)
end

asks the user to specify x, and then gives the value of f(x).

My inputs and the program's responses:

>> integersOnly
x:100
   170
x:500
   857
x:1100
        1888
x:1050
        1802
x:1000
        1716
x:800
        1373
x:700
        1200
x:701
        1201
x:715
        1225
x:710
        1217
x:709
        1215
x:708
        1214
x:
Operation terminated by user during integersOnly 

The answer is x = 709.

  Posted by Charlie on 2023-09-25 08:39:48
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 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information