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!)
A135585 a(n) = Sum_{i=1..n} (floor(S2(i)/3) mod 2), where S2(i) = A000120(i). 2

%I #19 Oct 20 2016 12:55:07

%S 0,0,0,0,0,0,0,1,1,1,1,2,2,3,4,5,5,5,5,6,6,7,8,9,9,10,11,12,13,14,15,

%T 16,16,16,16,17,17,18,19,20,20,21,22,23,24,25,26,27,27,28,29,30,31,32,

%U 33,34,35,36,37,38,39,40,41,41,41,41,41,42

%N a(n) = Sum_{i=1..n} (floor(S2(i)/3) mod 2), where S2(i) = A000120(i).

%C Sequence A115384 is a(n) = Sum_{i=1..n} (floor(S2(n)*1/1) mod 2) = Sum_{i=1..n} (S2(n) mod 2).

%H G. C. Greubel, <a href="/A135585/b135585.txt">Table of n, a(n) for n = 0..1000</a>

%p A000120 := proc(n) local i ; add(i,i=convert(n,base,2)) : end: A135585 := proc(n) add(floor(A000120(i)/3) mod 2,i=1..n) ; end: seq(A135585(n),n=0..80) ; # _R. J. Mathar_, Apr 22 2008

%t f[n_] := n - Sum[Floor[n/2^k], {k, 1, Infinity}]; Table[Sum[Mod[Floor[f[i]/3], 2], {i,1,n}], {n,0,25}] (* _G. C. Greubel_, Oct 20 2016 *)

%o (PARI) a(n) = sum(i=1, n, hammingweight(i)\3 % 2); \\ _Michel Marcus_, Sep 19 2015

%Y Cf. A115384, A010060.

%K easy,nonn,base

%O 0,12

%A _Ctibor O. Zizka_, Feb 25 2008

%E Definition corrected by _R. J. Mathar_, Apr 22 2008

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 May 5 13:00 EDT 2024. Contains 372275 sequences. (Running on oeis4.)