|
|
A129756
|
|
Repetitions of odd numbers four times.
|
|
8
|
|
|
1, 1, 1, 1, 3, 3, 3, 3, 5, 5, 5, 5, 7, 7, 7, 7, 9, 9, 9, 9, 11, 11, 11, 11, 13, 13, 13, 13, 15, 15, 15, 15, 17, 17, 17, 17, 19, 19, 19, 19, 21, 21, 21, 21, 23, 23, 23, 23, 25, 25, 25, 25, 27, 27, 27, 27, 29, 29, 29, 29, 31, 31, 31, 31, 33, 33, 33, 33, 35, 35, 35, 35, 37, 37, 37, 37
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,5
|
|
COMMENTS
|
Conjecture: number of roots of P(x) = x^n - x^(n-1) - x^(n-2) - ... - x - 1 in the right half-plane. - Michel Lagneau, Apr 09 2013
|
|
LINKS
|
|
|
FORMULA
|
a(n) = (Sum_{k=0..n} (k+1)*cos((n-k)*Pi/2)) + (1/4)*(2*cos(n*Pi/2) + 1 + (-1)^n) - 1, with n >= 0.
G.f.: (1+x^4)/((-1+x)^2*(1+x)*(x^2+1)). - R. J. Mathar, Nov 18 2007
a(n) = -1 + Sum_{k=0..n} ((1/12)*(-5*(k mod 4) + ((k+1) mod 4) + ((k+2) mod 4) + 7*((k+3) mod 4))). - Paolo P. Lava, Aug 21 2009
a(n) = (2*n + 1 + 2*cos(n*Pi/2) + cos(n*Pi) + 2*sin(n*Pi/2))/4. - Wesley Ivan Hurt, Oct 02 2017
E.g.f.: (cos(x) + cosh(x) + sin(x) + x*(cosh(x) + sinh(x)))/2.
a(n) = a(n-1) + a(n-4) - a(n-5) for n > 4. (End)
|
|
MATHEMATICA
|
Table[1 + 2 Floor[n/4], {n, 0, 100}] (* Bruno Berselli, Jul 26 2014 *)
CoefficientList[Series[(1 + x^4)/(-1 + x)^2/(1 + x)/(x^2 + 1), {x, 0, 100}], x] (* Vincenzo Librandi, Jul 26 2014 *)
|
|
PROG
|
(Magma) [1+2*Floor(n/4): n in [0..100]]; // Bruno Berselli, Jul 26 2014
(Magma) I:=[1, 1, 1, 1, 3, 3, 3, 3, 5]; [n le 9 select I[n] else Self(n-1)+Self(n-4)-Self(n-5): n in [1..100]]; // Vincenzo Librandi, Jul 25 2014
(Python)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|