if the answer includes a variable to the power of #2#, it is most likely a quadratic sequence.

the general formula for a quadratic sequence is #u_n = an^2+bn+c#

#0, 2, 6, 12, 20, 30, 42#

#2, 4, 6, 8, 10, 12# #(d_1)#

#2, 2, 2, 2, 2# #(d_2)#

the second difference is constant.

in #an^2+bn+c, a = d_2/2#

#a = 2/2 = 1#

this means that #u_n = n^2+bn+c#

#b# and #c# can be found by comparing the sequence in question with the sequence #u_n = n^2#, since #a# is the same for both of them.

#u_n = n^2+bn+c:#

#0, 2, 6, 12, 20#

#u_n = n^2:#

#1,4,9,16,25#

then, subtract the numbers in #u_n = n^2# from #u_n = n^2+bn+c:#

#0-1 = -1#

#2-4 = -2#

#6-9= -3#

#12-16 = -4#

subtracting #n^2# from #u_n = n^2+bn+c# gives us #bn+c#, which is a linear sequence.

#-1, -2, -3, -4...#

the #n#th term here is #-n#.

this means that #bn+c = -n#

#-n# is the same as #-n +0#, which gives #c# as #0#, and #b# as #-1#.

finally, #a= 1, b=-1, c=0#

#an^2+bn+c = n^2-n#

#u_n = an^2+bn+c = n^2-n#