×

# Can anyone help me with Spiral Numbers from Dementia 2012 - IIT Mandi Contest?

 0 Hello friends can someone tell me how to approach this problem ?? asked 14 Apr, 07:07 248●10 accept rate: 1%

 2 Analyze the pattern. Here, it seems that difference between 2 consecutive results is : $N_{i + 1} - N_{i} = 8i + 1 \quad \forall \quad i >= 0 \quad; \quad N_0 = 0$ Use this to come up with formula for $N_i$. I came up with this quadratic formula: $(4i - 7)(i - 1)$ https://www.codechef.com/viewsolution/18244780 answered 14 Apr, 09:09 76●3 accept rate: 12% Thanks for your efforts :) Could you explain how did you get that quadratic equation ? (14 Apr, 12:21) On using summation on RHS I came up with 4ii+5*i+1 as the answer. (14 Apr, 12:38) 1 @harrypotter0 tbh I was really sleepy when I came up with the equation so I can't remember the exact procedure I went through. To come up with an equation for $n^{th}$ term: Let a function $f(x) = 8x + 1$ Then, $N_1 = f(0) , \quad N_2 = f(0) + f(1)$ and so on So $N_i = \sum_{n=0}^{i-1} f(i)$ Use sum of n terms to get a formula: $N_i = 8(0 + 1 + 2 + ... + (i-1)) + (1 + 1 + ...(i\quad times)... + 1)$ $N_i = i(4i - 3)$ My equation is just for $(i - 1)^{th}$ term instead of $i^{th}$ term. (14 Apr, 19:50) 1 @harrypotter0 I forgot to add that your expression gives $(i + 1)^{th}$ term, otherwise its same.. :D (14 Apr, 22:28) 1 @fr4nkesti3n I got it now thanks :) (15 Apr, 10:04)
 toggle preview community wiki:
Preview

By Email:

Markdown Basics

• *italic* or _italic_
• **bold** or __bold__
• image?![alt text](/path/img.jpg "title")
• numbered list: 1. Foo 2. Bar
• to add a line break simply add two spaces to where you would like the new line to be.
• basic HTML tags are also supported
• mathemetical formulas in Latex between \$ symbol

Question tags:

×2,540
×2,195
×98
×16
×4