login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A213038 a(n) = n^2 - 3*floor(n/2)^2. 1
0, 1, 1, 6, 4, 13, 9, 22, 16, 33, 25, 46, 36, 61, 49, 78, 64, 97, 81, 118, 100, 141, 121, 166, 144, 193, 169, 222, 196, 253, 225, 286, 256, 321, 289, 358, 324, 397, 361, 438, 400, 481, 441, 526, 484, 573, 529, 622, 576, 673, 625, 726, 676, 781, 729, 838 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,4

LINKS

Colin Barker, Table of n, a(n) for n = 0..1000

Index entries for linear recurrences with constant coefficients, signature (1,2,-2,-1,1).

FORMULA

a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5).

G.f.: x*(1+3*x^2-2*x^3) / ((1-x)^3*(1+x)^2). [Corrected by Colin Barker, Jan 26 2016]

a(n) = ( 2*n*(n+3) - 3*(2*n-1)*(-1)^n - 3 )/8. [Bruno Berselli, Jan 26 2016]

MATHEMATICA

a[n_] := n^2 - 3 Floor[n/2]^2

Table[a[n], {n, 0, 90}] (* A213038 *)

LinearRecurrence[{1, 2, -2, -1, 1}, {0, 1, 1, 6, 4}, 60] (* Harvey P. Dale, Sep 22 2019 *)

PROG

(PARI) concat(0, Vec(x*(1+3*x^2-2*x^3)/((1-x)^3*(1+x)^2) + O(x^100))) \\ Colin Barker, Jan 26 2016

CROSSREFS

Sequence in context: A006582 A263586 A180497 * A337512 A131828 A096038

Adjacent sequences: A213035 A213036 A213037 * A213039 A213040 A213041

KEYWORD

nonn,easy

AUTHOR

Clark Kimberling, Jun 06 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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 20 06:24 EDT 2023. Contains 361359 sequences. (Running on oeis4.)