Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A083741
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A083741 a(n) = l(n) + a(l(n)), where l(n) = n - 2^floor(log2(n)) (A053645). +0
2
0, 0, 0, 1, 0, 1, 2, 4, 0, 1, 2, 4, 4, 6, 8, 11, 0, 1, 2, 4, 4, 6, 8, 11, 8, 10, 12, 15, 16, 19, 22, 26, 0, 1, 2, 4, 4, 6, 8, 11, 8, 10, 12, 15, 16, 19, 22, 26, 16, 18, 20, 23, 24, 27, 30, 34, 32, 35, 38, 42, 44, 48, 52, 57, 0, 1, 2, 4, 4, 6, 8, 11, 8, 10, 12, 15, 16, 19, 22, 26 (list; graph; listen)
OFFSET

0,7

COMMENT

a(2^i)=0. Local extrema are a(2^i-1) = 2^i-i-1 (A000295).

LINKS

J.-P. Allouche and J. Shallit, The ring of k-regular sequences, Theoretical Computer Sci., 98 (1992), 163-197, ex. 24.

FORMULA

a(0)=0, a(1)=0, a(2n)=2a(n), a(4n+1)=2a(n)+a(2n+1), a(4n+3)=-2a(n)+3a(2n+1)+1.

PROGRAM

(PARI) a(n)=if(n<2, 0, if(n%2==0, 2*a(n/2), if(n%4==1, 2*a((n-1)/4)+a((n+1)/2), -2*a((n-3)/4)+3*a((n-3)/2+1)+1)))

CROSSREFS

Sequence in context: A078145 A074078 A130659 this_sequence A118343 A005657 A009332

Adjacent sequences: A083738 A083739 A083740 this_sequence A083742 A083743 A083744

KEYWORD

nonn,easy

AUTHOR

Ralf Stephan (ralf(AT)ark.in-berlin.de), May 05 2003

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified July 26 13:41 EDT 2008. Contains 142293 sequences.


AT&T Labs Research