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!)
A213037 a(n) = n^2 - 2*floor(n/2)^2. 7
0, 1, 2, 7, 8, 17, 18, 31, 32, 49, 50, 71, 72, 97, 98, 127, 128, 161, 162, 199, 200, 241, 242, 287, 288, 337, 338, 391, 392, 449, 450, 511, 512, 577, 578, 647, 648, 721, 722, 799, 800, 881, 882, 967, 968, 1057, 1058, 1151, 1152, 1249, 1250, 1351 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
FORMULA
a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5).
G.f.: x*(1 + x + 3*x^2 - x^3)/((1 - x)^3*(1 + x)^2). [Corrected by Bruno Berselli, Sep 16 2014]
a(n) = A000290(n) - 2*A008794(n). - Michel Marcus, May 27 2022
E.g.f.: ((3*x + x^2)*cosh(x) + (-1 + x + x^2)*sinh(x))/2. - David Lovler, Jun 20 2022
Sum_{n>=1} 1/a(n) = Pi^2/12 - cot(Pi/sqrt(2))*Pi/(2*sqrt(2)) + 1/2. - Amiram Eldar, Sep 24 2022
MATHEMATICA
a[n_] := n^2 - 2 Floor[n/2]^2
Table[a[n], {n, 0, 90}] (* A213037 *)
LinearRecurrence[{1, 2, -2, -1, 1}, {0, 1, 2, 7, 8}, 60] (* Harvey P. Dale, Oct 06 2016 *)
PROG
(PARI) a(n) = n^2 - 2*(n\2)^2; \\ Michel Marcus, May 25 2022
CROSSREFS
Cf. A247375.
Cf. A322630 (diagonal).
Sequence in context: A032689 A331489 A300476 * A287343 A101518 A055247
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 April 24 16:49 EDT 2024. Contains 371962 sequences. (Running on oeis4.)