login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A196096 Occurrences of '11' in base 3 expansion of n. 2

%I #16 Nov 29 2013 21:20:27

%S 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,

%T 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,

%U 1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1

%N Occurrences of '11' in base 3 expansion of n.

%C Occurrences of '11' in A007089(n). This is to base 3 and A007089 as A014081 is to base 2 A007088.

%C First occurrence of k>0 = 4, 13, 40, 121, 364, ..., = A003462(k). (* _Robert G. Wilson v_, Sep 27 2011 *)

%H T. D. Noe, <a href="/A196096/b196096.txt">Table of n, a(n) for n = 0..1000</a>

%e a(4) = 1 because 4 in base 3 is "11" which has one instance of "11".

%e a(13) = 2 because the number 13 in base 3 is "111" which has two substrings of "11".

%p A196096 := proc(n)

%p local a,dgs3 ;

%p a := 0 ;

%p dgs3 := convert(n,base,3) ;

%p for i from 1 to nops(dgs3)-1 do

%p if op(i,dgs3)=1 and op(i+1,dgs3)=1 then

%p a := a+1 ;

%p end if;

%p end do;

%p a ;

%p end proc:

%p seq(A196096(n),n=0..80) ; # _R. J. Mathar_, Sep 28 2011

%t f[n_] := Count[ Partition[ IntegerDigits[ n, 3], 2, 1], {1, 1}]; Array[f, 100, 0] (* _Robert G. Wilson v_, Sep 27 2011 *)

%Y Cf. A007089, A014081.

%K easy,nonn

%O 0,14

%A _Jonathan Vos Post_, Sep 27 2011

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 04:02 EDT 2024. Contains 371918 sequences. (Running on oeis4.)