wu :: forums
« wu :: forums - Tricky Sequence »

Welcome, Guest. Please Login or Register.
Oct 18th, 2018, 7:16am

RIDDLES SITE WRITE MATH! Home Home Help Help Search Search Members Members Login Login Register Register
   wu :: forums
   riddles
   hard
(Moderators: towr, william wu, Eigenray, ThudnBlunder, Icarus, SMQ, Grimbal)
   Tricky Sequence
« Previous topic | Next topic »
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print
   Author  Topic: Tricky Sequence  (Read 173 times)
navdeep1771
Newbie
*



Let your thoughts go beyond your imagination

    navi
Email

Gender: male
Posts: 22
Tricky Sequence  
« on: May 15th, 2018, 1:03am »
Quote Quote Modify Modify

Find the 1000th Term of the Sequence:-
 
1,3,5,7,9,11,13,15,17,19,31,33,35,37,39,51.....and so on.
 
Note:-
1. Yes, there is "31" after "19"
2. It's a completely logical problem with a logical solution.
« Last Edit: May 15th, 2018, 8:18am by navdeep1771 » IP Logged
Grimbal
wu::riddles Moderator
Uberpuzzler
*****






   


Gender: male
Posts: 7418
Re: Tricky Sequence  
« Reply #1 on: May 15th, 2018, 5:07am »
Quote Quote Modify Modify

If there were a 7 then it would be all numbers with only odd digits.
IP Logged
navdeep1771
Newbie
*



Let your thoughts go beyond your imagination

    navi
Email

Gender: male
Posts: 22
Re: Tricky Sequence  
« Reply #2 on: May 15th, 2018, 8:18am »
Quote Quote Modify Modify

Sorry @Grimbal for that mistake. I was in little hurry when I posted this question.  
Well, I modified it and you can try it now again.
« Last Edit: May 15th, 2018, 8:21am by navdeep1771 » IP Logged
Grimbal
wu::riddles Moderator
Uberpuzzler
*****






   


Gender: male
Posts: 7418
Re: Tricky Sequence  
« Reply #3 on: May 16th, 2018, 5:19am »
Quote Quote Modify Modify

That's a tough one.  Maybe all integers with only odd digits?
IP Logged
towr
wu::riddles Moderator
Uberpuzzler
*****



Some people are average, some are just mean.

   


Gender: male
Posts: 13647
Re: Tricky Sequence  
« Reply #4 on: May 16th, 2018, 1:14pm »
Quote Quote Modify Modify

Well, in that case, the 1000th one would be 13779
 
The easy way to find it is just run a script.  
The clever way to find it is to notice it's basically the integers in base five, but encoded with odd digits instead of consecutive digits.
 
(1+1)/2 * 5 4 + (3+1)/2 * 5 3 + (7+1)/2 * 5 2 + (7+1)/2 * 5 1 + (9+1)/2 * 5 0  = 1000
« Last Edit: May 16th, 2018, 1:56pm by towr » IP Logged

Wikipedia, Google, Mathworld, Integer sequence DB
Grimbal
wu::riddles Moderator
Uberpuzzler
*****






   


Gender: male
Posts: 7418
Re: Tricky Sequence  
« Reply #5 on: May 17th, 2018, 5:36am »
Quote Quote Modify Modify

Err...  It seems that after reaching the first stumbling block, I didn't even read the end of the question.
 
There are 5 1-digit, 25 2-digit, 125 3-digit and 625 4-digit numbers.  A total of 780.  781st number is 11111.  To get the 1000th, convert 1000-781 to base 5 and replace 01234 by 13579.
1000-781 = 219.  In base 5 it is 01334
Replacing digits gives 13779

 
Towr is actually cheating.  1000 in base 5 is 13000.  His so-called base 5 uses digits 1-5 and not 0-4.  Which is actually cleverer than what I did.
- But it is cheating.
- Is it?  But it works.
- Yeah... it is the Kobayashi Maru all over again.
« Last Edit: May 18th, 2018, 8:05am by Grimbal » IP Logged
towr
wu::riddles Moderator
Uberpuzzler
*****



Some people are average, some are just mean.

   


Gender: male
Posts: 13647
Re: Tricky Sequence  
« Reply #6 on: May 17th, 2018, 10:12am »
Quote Quote Modify Modify

Well, as I said (or at least suggested), I first found the answer just by running a simple loop over all numbers and counting the ones with only odd digits.
 
The other way I found to get the answer is to convert to base 5, replace all 0s with 5s by borrowing from the preceding digit, and then double every digit and subtract 1.

100010 -> 130005 -> 124455+ -> 137795odd
62510 -> 100005 -> 44455+ -> 77795odd
78010 -> 111105 -> 55555+ -> 99995odd
IP Logged

Wikipedia, Google, Mathworld, Integer sequence DB
navdeep1771
Newbie
*



Let your thoughts go beyond your imagination

    navi
Email

Gender: male
Posts: 22
Re: Tricky Sequence  
« Reply #7 on: May 17th, 2018, 11:45am »
Quote Quote Modify Modify

Well done guys!  
13779 is the correct answer.
So you both (grimbal and towr) are correct and towr is really very clever.
Well, I solved this problem with the same way as of grimbal. But yeah towr's approach is hard to get clicked.
« Last Edit: Jun 17th, 2018, 12:04am by navdeep1771 » IP Logged
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print

« Previous topic | Next topic »

Powered by YaBB 1 Gold - SP 1.4!
Forum software copyright © 2000-2004 Yet another Bulletin Board