|
| |
|
|
A005590
|
|
a(0) = 0, a(1) = 1, a(2n) = a(n), a(2n+1) = a(n+1)-a(n).
(Formerly M0048)
|
|
3
| |
|
|
0, 1, 1, 0, 1, -1, 0, 1, 1, -2, -1, 1, 0, 1, 1, 0, 1, -3, -2, 1, -1, 2, 1, -1, 0, 1, 1, 0, 1, -1, 0, 1, 1, -4, -3, 1, -2, 3, 1, -2, -1, 3, 2, -1, 1, -2, -1, 1, 0, 1, 1, 0, 1, -1, 0, 1, 1, -2, -1, 1, 0, 1, 1, 0, 1, -5, -4, 1, -3, 4, 1, -3, -2, 5, 3, -2, 1, -3, -2, 1, -1, 4, 3, -1, 2, -3, -1, 2, 1, -3, -2, 1, -1, 2, 1, -1, 0, 1, 1, 0, 1, -1, 0, 1, 1
(list; graph; refs; listen; history; internal format)
|
|
|
|
OFFSET
| 0,10
|
|
|
COMMENTS
| Sequence is 2-regular.
G.f. satisfies A(x)=(1+1/x-x)*A(x^2). - Michael Somos, Sep 17 2003
Contribution from Gary W. Adamson (qntmpkt(AT)yahoo.com), Apr 13 2010: (Start)
Let M = a triangular matrix with (1, 1, -1, 0, 0, 0,...) in every column
>k=1 shifted down twice from the previous column. Then A005590 starting
with 1 = Lim_{n->inf} M^n, the left-shifted vector considered as a sequence.
(End)
|
|
|
REFERENCES
| J.-P. Allouche and J. Shallit, The ring of k-regular sequences, Theoretical Computer Sci., 98 (1992), 163-197.
B. Reznick, A new sequence with many properties, Abstract 809-10-185, Abstracts Amer. Math. Soc., 5 (1984), p. 16.
B. Reznick, Some extremal problems for continued fractions, Ill. J. Math., 29 (1985), 261-279.
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
|
|
|
LINKS
| T. D. Noe, Table of n, a(n) for n=0..10000
J.-P. Allouche and J. Shallit, The ring of k-regular sequences, Theoretical Computer Sci., 98 (1992), 163-197.
Michael Gilleland, Some Self-Similar Integer Sequences
R. Stephan, Divide-and-conquer generating functions. I. Elementary sequences
|
|
|
FORMULA
| G.f.: x*prod(k>=0, 1+x^2^k-x^2^(k+1)). - Ralf Stephan, Apr 26 2003
Conjecture: a(3n)=0 iff n in A003714. - Ralf Stephan, May 2 2003
a(n)=sum{k=0..n-1, (-1)^A010060(n-k-1)*(binomial(k, n-k-1) mod 2)}; - Paul Barry (pbarry(AT)wit.ie), Mar 26 2005
|
|
|
MAPLE
| A005590 := proc(n) option remember; if n <= 1 then n; elif n mod 2 = 0 then A005590(n/2); else A005590((n+1)/2)-A005590((n-1)/2); fi; end;
|
|
|
PROG
| (PARI) a(n)=if(n<=1, n>0, if(n%2, a(n\2+1)-a(n\2), a(n/2))) (from Michael Somos)
|
|
|
CROSSREFS
| Cf. A002487.
Sequence in context: A145865 A076452 A076453 * A142598 A037800 A144411
Adjacent sequences: A005587 A005588 A005589 * A005591 A005592 A005593
|
|
|
KEYWORD
| sign,nice,easy
|
|
|
AUTHOR
| N. J. A. Sloane (njas(AT)research.att.com).
|
|
|
EXTENSIONS
| More terms from Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Mar 28 2003
Signs corrected by Ralf Stephan, Apr 26 2003
|
| |
|
|