|
Search: id:A005590
|
|
|
| A005590 |
|
a(0) = 0, a(1) = 1, a(2n) = a(n), a(2n+1) = a(n+1)-a(n). (Formerly M0048)
|
|
+0 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; listen)
|
|
|
OFFSET
|
0,10
|
|
|
COMMENT
|
Sequence is 2-regular.
G.f. satisfies A(x)=(1+1/x-x)*A(x^2). - Michael Somos, Sep 17 2003
|
|
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;
|
|
PROGRAM
|
(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 this_sequence A142598 A037800 A144411
Adjacent sequences: A005587 A005588 A005589 this_sequence 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
|
|
|
Search completed in 0.002 seconds
|