Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A030301
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A030301 n-th run has length 2^(n-1). +0
4
0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 (list; graph; listen)
OFFSET

1,1

FORMULA

a(n) = 0 iff n has an odd number of digits in binary, = 1 otherwise - Henry Bottomley (se16(AT)btinternet.com), Apr 06 2000

a(n) = (1/2)*{1-(-1)^floor(ln(n)/ln(2))}. - Benoit Cloitre (benoit7848c(AT)orange.fr), Nov 22 2001

a(n)=1-a(floor(n/2)). - Vladeta Jovovic (vladeta(AT)eunet.rs), Aug 04 2003

PROGRAM

(PARI) a(n)=if(n<1, 0, 1-length(binary(n))%2)

(PARI) a(n)=if(n<1, 0, if(n%2==0, -a(n/2)+1, -a((n-1)/2)+1-(((n-1)/2)==0))) (from R. Stephan)

CROSSREFS

a(n) = A000523(n) mod 2 = (A029837(n+1)+1) mod 2.

Cf. A030300. Partial sums give A079954.

Sequence in context: A072608 A125720 A095130 this_sequence A071981 A093692 A105384

Adjacent sequences: A030298 A030299 A030300 this_sequence A030302 A030303 A030304

KEYWORD

nonn,easy

AUTHOR

Jean-Paul Delahaye (Jean-Paul.Delahaye(AT)lifl.fr)

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 November 25 20:09 EST 2009. Contains 167514 sequences.


AT&T Labs Research