cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A196096 Occurrences of '11' in base 3 expansion of n.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 2, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 2, 3, 2, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 2, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1
Offset: 0

Views

Author

Jonathan Vos Post, Sep 27 2011

Keywords

Comments

Occurrences of '11' in A007089(n). This is to base 3 and A007089 as A014081 is to base 2 A007088.
First occurrence of k>0 = 4, 13, 40, 121, 364, ..., = A003462(k). - Robert G. Wilson v, Sep 27 2011

Examples

			a(4) = 1 because 4 in base 3 is "11" which has one instance of "11".
a(13) = 2 because the number 13 in base 3 is "111" which has two substrings of "11".
		

Crossrefs

Programs

  • Maple
    A196096 := proc(n)
            local a,dgs3 ;
            a := 0 ;
            dgs3 := convert(n,base,3) ;
            for i from 1 to nops(dgs3)-1 do
                    if op(i,dgs3)=1 and op(i+1,dgs3)=1 then
                            a := a+1 ;
                    end if;
            end do;
            a ;
    end proc:
    seq(A196096(n),n=0..80) ; # R. J. Mathar, Sep 28 2011
  • Mathematica
    f[n_] := Count[ Partition[ IntegerDigits[ n, 3], 2, 1], {1, 1}]; Array[f, 100, 0] (* Robert G. Wilson v, Sep 27 2011 *)