login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A056980 Number of blocks of {1, 1, 0} in binary expansion of n. 11
0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,54

COMMENTS

a(n) = A213629(n,6) for n > 5. - Reinhard Zumkeller, Jun 17 2012

LINKS

Reinhard Zumkeller, Table of n, a(n) for n = 1..10000

Eric Weisstein's World of Mathematics, DigitBlock

FORMULA

a(2n) = a(n) + [n congruent to 3 mod 4], a(2n+1) = a(n). - Ralf Stephan, Aug 22 2003

MATHEMATICA

a[1] = a[2] = 0; a[n_] := a[n] = If[OddQ[n], a[(n - 1)/2], a[n/2] + Boole[Mod[n/2, 4] == 3]]; Table[a[n], {n, 1, 102}] (* Jean-Fran├žois Alcover, Oct 22 2012, after Ralf Stephan *)

PROG

(Haskell)

import Data.List (tails, isPrefixOf)

a056980 = sum . map (fromEnum . ([0, 1, 1] `isPrefixOf`)) .

                    tails . a030308_row

-- Reinhard Zumkeller, Jun 17 2012

(PARI)

a(n) = hammingweight(bitnegimply(bitand(n>>1, n>>2), n));

vector(102, i, a(i))  \\  Gheorghe Coserea, Sep 07 2015

CROSSREFS

Cf. A014082, A056974, A056975, A056976, A056977, A056978, A056979, A056980.

Sequence in context: A176046 A172090 A037912 * A268643 A005094 A121372

Adjacent sequences:  A056977 A056978 A056979 * A056981 A056982 A056983

KEYWORD

nonn,easy

AUTHOR

Eric W. Weisstein

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 29 03:06 EDT 2020. Contains 334696 sequences. (Running on oeis4.)