I have an integer n in my mind which satisfies following properties:
Enter your answer as p + n
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
TBH I didn't know abt the smallest such number thing .
I knew of it from when once I had wrongly proved that π is a non-terminating recurring number by wrongly assuming that π = 7 2 2 is accurate !
And then this number had me quite fascinated .
I'll be waiting for your solution :)
Log in to reply
Done! Anyways I was wonderinng if some p is there such that its digits matches with 7 p as well, but couldn't find it. Moreover, 1 4 2 8 5 7 is the smallest number whose digits matches with only 2 p and 3 p , 4 p , 5 p , 6 p are just in addition.
Log in to reply
Well the way you have solved it , it's difficult to use it to find the same for 7 p and btw I mostly use Java , so it'll be quite difficult for me to do the same .
But I think I can manage it , I'll try this question out too .
Also , nice Profile Pic ! It's been quite a few months since I lasted watched Pokemon ⌢ ¨ , I hope I'll get a lot time after JEE Advanced to do so !
Log in to reply
@A Former Brilliant Member – I am a big fan of Pokemon. Especially Indigo League and Orange League.
As for the
7
p
, you just have to add one more
if ndigits(p)==ndigits(7*p)
, and reduce the max limit to
7
1
0
×
1
0
n
. Also I forgot to add function ndigits from my custom library. I hope you'll understand my solution now.
Log in to reply
@Pranjal Jain – Well then I'm a bigger fan :P
Did you ever play any of the Pokemon games on Game Boy Advance , Nintendo DS or any game station or their Emulator equivalents ?
I have played :
Pokemon HeartGold (Johto Region)
Pokemon LeafGreen (Kanto Region)
Pokemon Sapphire , Emerald (Hoenn Region)
Pokemon Diamond , Platinum (Sinnoh Region)
Pokemon Black 2 (Unova Region)
Yep! I play (used to until quite recently) a lot of games . But I guess you are the studious type , right ?
Log in to reply
@A Former Brilliant Member – Lol NOO!! I am talking about television series. @5 PM
Log in to reply
@Pranjal Jain – There has to be a meme on Pokemon and 5 PM, they are so closely related!
Log in to reply
@Kartik Sharma – Why do you say so?
@Pranjal Jain – Yeah , I too have watched all the seasons of Pokemon till Diamond and Pearl . Didn't get enough time to watch Pokemon X and Y but I made up for it by playing the game .
You know you can maybe try the games after you get into an IIT , those are among the "must play" games of the this century !
Log in to reply
@A Former Brilliant Member – I know I should and I will!!
@A Former Brilliant Member – Oh, well I see you haven't played the most famous of them - The Fire red of course. I used to play that plus Emerald. BTW, you have played a lot of them. I used to play on emulators, actually. Did you play on game stations? Interesting! I thought no one bought those consoles. And yeah, after Sinnoh, Pokemon just vanished, ah! How can children of these days rely on those baseless stupid Indian animated cartoons(in the usual case)?!
Log in to reply
@Kartik Sharma – Actually I don't own any of the gaming consoles so I had to stick with emulators !
Yes , I remember those beautiful childhood days of mine when I would want to rush home from school and sit down to watch the Detective Conan show at 3:00 pm then the Power Rangers Series on Jetix (I have watched all the good ones in the series , the list is provided below) followed by POKEMON at 5:00 ! Those were the days !
The list of Power Rangers series that I have watched :
Power Rangers Wild Force (the first one that I watched)
Power Rangers Time Force
Power Rangers Ninja Storm
Power Rangers Dino Thunder
Power Rangers SPD
Power Rangers Mystic Force (the one I liked the most !)
Most of the latest Power Rangers series post Mystic Force were just some boring dramas without any proper storyline .
P.S. I don't know why but I feel no one will be interested in this stuff , but I thought I should post it anyway .
@A Former Brilliant Member – @Azhaghu Roopesh M @Kartik Sharma @Pranjal Jain Good to know that there are other pokemon fans around here! My personal favorite is Emerald, especially it's cloning glitch. My friends and myself started playing this since class 5. I own a Gameboy advance SP(can't find it now :( ), and a DS lite. I have original casettes of Emerald, leafgreen and Diamond. Here are the games I have played:
Kanto: Red, Green, Yellow, firered,leafgreen(twice)
Johto: Crystal, Gold, Heartgold, Soulsilver
Hoenn: Ruby(twice), Saphire, Emerald(4 times)
Sinnoh: Diamond, Platinum
Unova: Black, white(halfway, regret not finishing it)
I scolded my brother for misplacing the gameboy. Tried my DS after years, still works! Diamond, a hundred and seventeen hours of gameplay!
For 7 p - 9 4 , 9 5 , 9 7
Log in to reply
@Kartik Sharma – You mean the values of n ?
@Pranjal Jain @Azhaghu Roopesh M
I knew this property beforehand as used to(still do) play with my calculator a lot. Nice question!
0 . 1 4 2 8 5 7 1 4 2 8 5 7 1 4 2 8 5 7 . . .
Log in to reply
Oh thats nice. ⌣ ¨
Yeah , me too :)
Do you experiment with a graphing calculator too ? I enjoy trying out random equations and plotting their graphs .
Log in to reply
I do! I use Algeo on Android for it. Its fun to use floor/frac+exponents/trigonommetric.
Log in to reply
@Pranjal Jain – Cool . Btw I use Quick Graph on my iPad , the same one that @Trevor Arashiro uses(only diff. being that he has the full version while I don't) .
Do you know of a graphing Calc. for Windows ? You know so that I can use it on my Laptop . I don't want to use Desmos since it doesn't work most of the time (for me at least) and also needs Internet connection . I wanted an offline software that can be used anytime .
Also try out the graphs of non-integrable functions like x sin x and logarithm of trigonometric functions! I think I'll upload a pic once I return from the exam hall .
Best of Luck to you :)
Log in to reply
@A Former Brilliant Member – Geogebra works on Windows. And yes I have plotted these functions already.
@A Former Brilliant Member – Try csc ( x ) csc ( y ) = 2
@Pranjal Jain , I didn't need even 10 seconds to solve this after reading the question, because what I was taught in std 9 , one of the fascinating things (for that age) , while they taught how to write a decimal recurring thing in fraction form.... that was 1 4 2 8 5 7 , when it came in 7 1
You write it's table, and you see that
1 4 2 8 5 7
2 8 5 7 1 4
4 2 8 5 7 1
5 7 1 4 2 8
7 1 4 2 8 5
8 5 7 1 4 2
9 9 9 9 9 9
Not just the digits are same, they are like cyclic... also, their first 2 digits are very much related to the table of 1 4 .... So cool!
Check out my solution! @Pranjal Jain
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
|
This just gives us smallest p (142857), and obviously 1/7=.142857 so n=7 and p+n=142864
I knew the answer even before writing the code but I still gave a go at it. Here's my solution in Java -
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
|
It takes about 0.1 second to run on my machine.
Nice method , it's similar to what I would have done .
Btw how do you know Java at the age of 14 ? Also do you use an IDE ? Netbeans perhaps ? If so , which version ?
Log in to reply
I started with JavaScript and HTML when I was 8 and learned Java when I was 13.
I use NetBeans IDE 8.0.2 and sometimes Geany (Linux's text editor which also provide basic features of IDE) as it's faster to start and work with.
Log in to reply
Wow! You sure have had a great start to a coder's life .
Currently I am stuck with Netbeans IDE 6.5.1 but once my exam gets over(the day after tomorrow) I'll start with 8.0.2 too .
Is JavaScript easy if you know Java ? I have heard a lot about it's use in Web designing and am interested to learn it . What say ?
Log in to reply
@A Former Brilliant Member – Thanks!
JavaScript is prototype-based while Java is class based. Also, JavaScript uses functions instead of methods so there is a little difference in syntax, but both almost work the same way. Apart from that, the basic syntax is quite similar and although some new concepts are introduced in JavaScript, they are easy to understand.
So I would say JavaScript would be quite easy to learn for you and I really think you should give a go at it. Best of luck for it!
Log in to reply
@Aryan Gaikwad – Thanks , I'll definitely go for it .
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
|
7
61
70
71
94
95
97
98
Which version of python are you using? I am using 3.4.2 to get
name 'getcontext' is not defined
Log in to reply
Really? I am using 2.7.5! Still, no getcontext! That's interesting! Maybe it is replaced by something else.
Log in to reply
Yeah 3.x is quite different from 2.x, there is no
xrange
even.
Problem Loading...
Note Loading...
Set Loading...
Note that p must be in [ 1 0 n , ( 3 5 ) × 1 0 n ] as the number of digits in p and 6 p are same.
It returns
142857
Now, m = 0 . 1 4 2 8 5 7 1 4 2 8 5 7 . . . = 0 . ( 1 4 2 8 5 7 ) = 7 1
Thus, n = 7
I believe there is some faster method.