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

Home > Just Math
Floor Function Query (Posted on 2016-01-25) Difficulty: 3 of 5
F(x) is a real valued function such that:
F(x) = floor(x) +floor(10x)+floor(100x)+floor(1000x)
Determine all possible values of a positive integer N < 2016 such that:
F(x) = N has no solution for x, but:
Each of the equations: F(y) = N+11 and F(z) = N+111 has at least one solution in y and z.

See The Solution Submitted by K Sengupta    
Rating: 5.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer solution Comment 1 of 1
F(x) goes up each time the real x reaches a new increment of 1/1000. Every 10th one of those it goes up by more than 1, usually 2, but every 1/10, the increment is 3, and of course whenever x is an integer itself, the increment is 4.

Every time x increases by 1 (in increments of 1/1000, as a sufficiently fine grain), F increases by 1111, so 111 values are skipped. The skipped values repeat in a cycle of 1111.

The program goes through two cycles, as the range from N through N+111 might span two demarcated cycles.  The first two cycles of missed numbers are:

10 21 32 43 54 65 76 87 98 109 110 121 132 143 154 165 176 187 198 209 220 221 232 243 254 265 276 287 298 309 320 331 332 343 354 365 376 387 398 409 420 431 442 443 454 465 476 487 498 509 520 531 542 553 554 565 576 587 598 609 620 631 642 653 664 665 676 687 698 709 720 731 742 753 764 775 776 787 798 809 820 831 842 853 864 875 886 887 898 909 920 931 942 953 964 975 986 997 998 1009 1020 1031 1042 1053 1064 1075 1086 1097 1108 1109 1110

1121 1132 1143 1154 1165 1176 1187 1198 1209 1220 1221 1232 1243 1254 1265 1276 1287 1298 1309 1320 1331 1332 1343 1354 1365 1376 1387 1398 1409 1420 1431 1442 1443 1454 1465 1476 1487 1498 1509 1520 1531 1542 1553 1554 1565 1576 1587 1598 1609 1620 1631 1642 1653 1664 1665 1676 1687 1698 1709 1720 1731 1742 1753 1764 1775 1776 1787 1798 1809 1820 1831 1842 1853 1864 1875 1886 1887 1898 1909 1920 1931 1942 1953 1964 1975 1986 1997 1998 2009 2020 2031 2042 2053 2064 2075 2086 2097 2108 2109 2120 2131 2142 2153 2164 2175 2186 2197 2208 2219 2220 2221
 
which the program identifies as having 222 values, as expected for two cycles.

It also identifies 1108 as being the first value sought for N, as it is on the list of missed F values, but 1108+11=1119 is not and 1108+111=1219 also is not. This is the only such identified value.

So the complete list of possible values for N is 1108 + 1111*k for all non-negative integers k.

DefDbl A-Z
Dim crlf$, missing(2222)


Private Sub Form_Load()
 Form1.Visible = True
 
 Text1.Text = ""
 crlf = Chr$(13) + Chr$(10)
 
 For thousandths = 1 To 2000
   prevct = ct
   ct = ct + 1
   If thousandths Mod 10 = 0 Then ct = ct + 1
   If thousandths Mod 100 = 0 Then ct = ct + 1
   If thousandths Mod 1000 = 0 Then ct = ct + 1
   If ct - prevct > 1 Then
     For i = prevct + 1 To ct - 1
       Text1.Text = Text1.Text & Str(i)
       totmissed = totmissed + 1
       missing(i) = 1
     Next
   End If
   If thousandths = 1000 Then Text1.Text = Text1.Text & crlf & crlf
   DoEvents
 Next
 
 Text1.Text = Text1.Text & crlf & crlf
 
 For i = 1 To 1111
   If missing(i) = 1 And missing(i + 11) = 0 And missing(i + 111) = 0 Then
     Text1.Text = Text1.Text & Str(i)
   End If
 Next
 

 Text1.Text = Text1.Text & crlf & crlf & totmissed & " done"
  
End Sub




  Posted by Charlie on 2016-01-25 11:16:57
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (1)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (10)
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