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!)
A151902 a(n) = wt(k) + f(j) if n = 6k+j, 0 <= j < 6, where wt() = A000120(), f() = A151899(). 5
0, 0, 1, 1, 1, 2, 1, 1, 2, 2, 2, 3, 1, 1, 2, 2, 2, 3, 2, 2, 3, 3, 3, 4, 1, 1, 2, 2, 2, 3, 2, 2, 3, 3, 3, 4, 2, 2, 3, 3, 3, 4, 3, 3, 4, 4, 4, 5, 1, 1, 2, 2, 2, 3, 2, 2, 3, 3, 3, 4, 2, 2, 3, 3, 3, 4, 3, 3, 4, 4, 4, 5, 2, 2, 3, 3, 3, 4, 3, 3, 4, 4, 4, 5, 3, 3, 4, 4, 4, 5, 4, 4, 5, 5, 5, 6, 1, 1, 2, 2, 2, 3, 2, 2, 3 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,6
LINKS
MAPLE
f := proc(n) local j; j:=n mod 6; if (j<=1) then 0 elif (j<=4) then 1 else 2; fi; end;
wt := proc(n) local w, m, i; w := 0; m := n; while m > 0 do i := m mod 2; w := w+i; m := (m-i)/2; od; w; end;
A151902 := proc(n) local k, j; k:=floor(n/6); j:=n-6*k; wt(k)+f(j); end;
MATHEMATICA
wt[n_] := DigitCount[n, 2, 1];
f[n_] := {0, 0, 1, 1, 1, 2}[[Mod[n, 6] + 1]];
a[n_] := wt[Floor[n/6]] + f[n - 6 Floor[n/6]];
Table[a[n], {n, 0, 104}] (* Jean-François Alcover, Feb 16 2023 *)
CROSSREFS
Sequence in context: A091975 A091976 A267825 * A094839 A341771 A092335
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Jul 31 2009
STATUS
approved

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 19 21:09 EDT 2024. Contains 371798 sequences. (Running on oeis4.)