|
|
A083219
|
|
a(n) = n - 2*floor(n/4).
|
|
7
|
|
|
0, 1, 2, 3, 2, 3, 4, 5, 4, 5, 6, 7, 6, 7, 8, 9, 8, 9, 10, 11, 10, 11, 12, 13, 12, 13, 14, 15, 14, 15, 16, 17, 16, 17, 18, 19, 18, 19, 20, 21, 20, 21, 22, 23, 22, 23, 24, 25, 24, 25, 26, 27, 26, 27, 28, 29, 28, 29, 30, 31, 30, 31, 32, 33, 32, 33, 34, 35, 34, 35, 36, 37, 36, 37, 38
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
COMMENTS
|
Conjecture: number of roots of P(x) = x^n - x^(n-1) - x^(n-2) - ... - x - 1 in the left half-plane. - Michel Lagneau, Apr 09 2013
a(n) is n+2 with its second least significant bit removed (see A021913(n+2) for that bit). - Kevin Ryde, Dec 13 2019
|
|
LINKS
|
|
|
FORMULA
|
a(n) = a(n-1) + n mod 2 + (n mod 4 - 1)*(1 - n mod 2), a(0) = 0.
G.f.: x*(1+x+x^2-x^3)/((1-x)^2*(1+x)*(1+x^2)). - R. J. Mathar, Aug 28 2008
Bisection: a(2*k) = 2*floor((n+2)/4), a(2*k+1) = a(2*k) + 1, k >= 0. - Wolfdieter Lang, May 08 2017
a(n) = (2*n + 3 - 2*cos(n*Pi/2) - cos(n*Pi) - 2*sin(n*Pi/2))/4. - Wesley Ivan Hurt, Oct 02 2017
E.g.f.: ((1 + x)*cosh(x) - cos(x) + (2 + x)*sinh(x) - sin(x))/2. - Stefano Spezia, May 27 2021
Sum_{n>=1} (-1)^(n+1)/a(n) = 2*log(2) - 1. - Amiram Eldar, Aug 21 2023
|
|
MAPLE
|
a:= n-> n - 2*floor(n/4):
|
|
MATHEMATICA
|
LinearRecurrence[{1, 0, 0, 1, -1}, {0, 1, 2, 3, 2}, 80] (* Harvey P. Dale, Oct 01 2018 *)
|
|
PROG
|
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|