+ 10

New Challenge Numbers Pattern

Try to develop a code in any language which calculate that numbers pattern and complete each row until five numbers per row 1-2-5-27- 2-3-11- 3-4-19- 4-5-29- 5-6-41- Good Luck!!!

10th Jan 2018, 1:14 AM
Daniel
Daniel - avatar
13 Answers
+ 21
at least 2 full rows must be provided to identify the pattern correctly //bcz 27 can also be brought by 5^2 + 2 or 2^5 - 5 any many other thousands of ways
11th Jan 2018, 7:20 PM
Gaurav Agrawal
Gaurav Agrawal - avatar
10th Jan 2018, 1:55 AM
Oma Falk
Oma Falk - avatar
+ 7
Shelly Kapoor The game here is actually to try to understand it ... try to find a general way to get the next item in a line.
16th Jul 2018, 2:11 PM
Cépagrave
Cépagrave - avatar
10th Jan 2018, 3:58 AM
Sebastián Zapata
Sebastián Zapata - avatar
+ 5
I may be dumb but the pattern is not clear at all to me
10th Jan 2018, 1:20 AM
Dapper Mink
Dapper Mink - avatar
+ 5
https://code.sololearn.com/W7g7xdEtHcAY/?ref=app Thanku dear,you had brush up my concepts
16th Jul 2018, 6:51 PM
Shelly Kapoor
Shelly Kapoor - avatar
+ 5
😊😊
16th Jul 2018, 6:52 PM
Shelly Kapoor
Shelly Kapoor - avatar
11th Jan 2018, 8:56 PM
Cépagrave
Cépagrave - avatar
+ 4
I get it
16th Jul 2018, 2:55 PM
Shelly Kapoor
Shelly Kapoor - avatar
16th Jul 2018, 6:12 PM
Shelly Kapoor
Shelly Kapoor - avatar
+ 3
I don't understand the patterns
16th Jul 2018, 1:31 PM
Shelly Kapoor
Shelly Kapoor - avatar
+ 2
Is part of the challenge ;-)
10th Jan 2018, 1:31 AM
Daniel
Daniel - avatar
+ 2
Well, I tried to fix some things. You have to increase n by 1 every time. Also ** doesn't exist in JS, you must to use Math.pow(base, exponent) And then when you print in console you have to get back the pattern_5 to an empty list :) Here is the new part of the code to help to you pattern_5.push(Math.pow(pattern_5[n],2)+pattern_5[n-1]); n = 1+n; } console.log(pattern_5); pattern_5 = []; }
16th Jul 2018, 6:23 PM
Sebastián Zapata
Sebastián Zapata - avatar