Challenge sequence 1,3,7,13,21,43,57,73,91,111,157,183,211. All language welcome | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Challenge sequence 1,3,7,13,21,43,57,73,91,111,157,183,211. All language welcome

all languages are welcome...code it

1st Oct 2017, 12:47 PM
Saurabh Shah
Saurabh Shah - avatar
20 Answers
+ 7
every 4 subtraction they follow the pattern of increasing by 2. 3-1=2,7-3=4,13-7=6,21-13=8 To produce number 43:you say 21-13=8 in that 8 you add 6 which makes 14 and 14 is the difference between 43 and 57 .now if you add the differences of of 8 and 14 you get 22 which is the difference between 21 and 43. Now the pattern continues (4 subtraction)from the number 43 and 57 which have the difference of 14 ...the numbers 57 and 73 have difference of 16 and there problem solved!
1st Oct 2017, 6:26 PM
FIREmonger
FIREmonger - avatar
+ 8
here is it...revised and corrected code https://code.sololearn.com/cH87sH7q9nNe/?ref=app
1st Oct 2017, 1:09 PM
sayan chandra
sayan chandra - avatar
1st Oct 2017, 2:31 PM
Saurabh Shah
Saurabh Shah - avatar
+ 4
@Saurabh can you give more numbers? one more row
1st Oct 2017, 5:57 PM
FIREmonger
FIREmonger - avatar
+ 4
😁😜
1st Oct 2017, 6:28 PM
FIREmonger
FIREmonger - avatar
+ 3
is that the fibonazi? i may try.
1st Oct 2017, 1:49 PM
FIREmonger
FIREmonger - avatar
+ 3
i got the logic
1st Oct 2017, 6:05 PM
FIREmonger
FIREmonger - avatar
+ 2
I couldn't fully understand the sequence.. https://code.sololearn.com/cZXmCgT5jUEq/?ref=app
1st Oct 2017, 2:33 PM
Hiroki Masuda
Hiroki Masuda - avatar
+ 2
this logic can be obtained in two ways....one that is posted by @Space_hunky
1st Oct 2017, 6:28 PM
Saurabh Shah
Saurabh Shah - avatar
+ 1
you have to find the logic...that's the challenge
1st Oct 2017, 12:49 PM
Saurabh Shah
Saurabh Shah - avatar
3rd Oct 2017, 1:42 PM
Paulo Matsuda Ueno
0
What is the logic of this sequence ?
1st Oct 2017, 12:48 PM
Baptiste E. Prunier
Baptiste E. Prunier - avatar
0
@sayan chandra...the sequence is correct
1st Oct 2017, 1:22 PM
Saurabh Shah
Saurabh Shah - avatar
0
yes dear...you got it almost near...but sequence is correct
1st Oct 2017, 1:24 PM
Saurabh Shah
Saurabh Shah - avatar
0
so... 31 and 133 wont be in the sequence?????
1st Oct 2017, 1:24 PM
sayan chandra
sayan chandra - avatar
0
yupp
1st Oct 2017, 1:25 PM
Saurabh Shah
Saurabh Shah - avatar
0
@@ SAURABH SHAH see the code now... i changed it.. its perfect now
1st Oct 2017, 1:48 PM
sayan chandra
sayan chandra - avatar
0
@@sayan chandra well tried...
1st Oct 2017, 2:23 PM
Saurabh Shah
Saurabh Shah - avatar
0
@space_hunky yes...why not..stay tuned
1st Oct 2017, 6:04 PM
Saurabh Shah
Saurabh Shah - avatar
- 1
actually this question was asked in the interview...I thought if I share this questions it will be helpful for all of us
1st Oct 2017, 6:07 PM
Saurabh Shah
Saurabh Shah - avatar