Number Series: n^2 + n Pattern — Find Next Term

E · easyP · Verified PYQpattern-printingseries

Find the next number in the series: 2, 6, 12, 20, ? Pattern: nth term = n^2 + n → 1+1=2, 4+2=6, 9+3=12, 16+4=20, 25+5=?

Input
2 6 12 20
Output
30
Detect n for last term, compute (n+1)^2 + (n+1). Or use differences: 4,6,8,10 → next diff=10 → 20+10=30.
← MPCS Fitness Test — Average Oxygen Level of TraineesOdd Occurring Element in O(log N) →
Report an issue with this question