The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A215098 a(0)=0, a(1)=1, a(n) = n*(n-1) - a(n-2). 3
 0, 1, 2, 5, 10, 15, 20, 27, 36, 45, 54, 65, 78, 91, 104, 119, 136, 153, 170, 189, 210, 231, 252, 275, 300, 325, 350, 377, 406, 435, 464, 495, 528, 561, 594, 629, 666, 703, 740, 779, 820, 861, 902, 945, 990, 1035, 1080, 1127, 1176, 1225, 1274, 1325, 1378, 1431 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,3 COMMENTS Same seed, b(n) = n*(n+1) - b(n-2) : 0, 1, 6, 11, 14, 19, 28, 37, 44, 53, 66, 79, 90, 103, 120, 137, 152, 169, 190, 211, 230, 251, 276, 301, 324, 349, 378, 407, 434, 463, 496, 529, 560, 593, ... b(n) = a(n+1)-1  if  (n mod 4)<2, otherwise  b(n) = a(n+1)+1. LINKS Vincenzo Librandi, Table of n, a(n) for n = 0..1000 Index entries for linear recurrences with constant coefficients, signature (3,-4,4,-3,1). FORMULA G.f. (x-x^2+3*x^3-x^4)/(1-3*x+4*x^2-4*x^3+3*x^4-x^5). - David Scambler, Aug 06 2012 a(n) = (n^2+n-1+cos(pi*n/2)+sin(pi*n/2))/2. - Vaclav Kotesovec, Aug 11 2012 MATHEMATICA CoefficientList[Series[(x - x^2 + 3 x^3 - x^4) / (1 - 3 x + 4 x^2 - 4 x^3 + 3 x^4 - x^5), {x, 0, 70}], x] (* Vincenzo Librandi, Jul 18 2013 *) RecurrenceTable[{a[0]==0, a[1]==1, a[n]==n(n-1)-a[n-2]}, a, {n, 60}] (* or *) LinearRecurrence[{3, -4, 4, -3, 1}, {0, 1, 2, 5, 10}, 60] (* Harvey P. Dale, May 15 2016 *) PROG (Python) prpr = 0 prev = 1 for n in range(2, 77):     print prpr,     curr = n*(n-1) - prpr     prpr = prev     prev = curr CROSSREFS Cf. A007590 (a(0)=0, a(n) = n*(n-1) - a(n-1)). Cf. A178218 (a(1)=1, a(n) = n*(n+1) - a(n-1)). Sequence in context: A190459 A135042 A109666 * A024390 A125622 A080551 Adjacent sequences:  A215095 A215096 A215097 * A215099 A215100 A215101 KEYWORD nonn,easy AUTHOR Alex Ratushnyak, Aug 03 2012 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified August 3 05:55 EDT 2020. Contains 336197 sequences. (Running on oeis4.)