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!)
A004765 Numbers whose binary expansion does not begin 111. 1
0, 1, 2, 3, 4, 5, 6, 8, 9, 10, 11, 12, 13, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
LINKS
FORMULA
a(1) = 0, a(2) = 1, a(3) = 2, a(4) = 3, a(2^(m+1)+2^m+k+2) = 2^(m+2) + k, m >= 0, 0 <= k < (2^(m+1)+2^m). - Yosu Yurramendi, Aug 08 2016
From Robert Israel, Aug 08 2016: (Start)
For n >= 5, a(2n-2) = 2 a(n) and a(2n-1) = 2 a(n)+1.
G.f. g(x) satisfies g(x) - (2/x + 2/x^2)*g(x^2) = -x^2 - x^4 - x^6 + x^9/(1-x^2). (End)
MAPLE
f:= proc(n) option remember;
if n < 8 then n-1
else 2*procname(floor((n+2)/2))+(n mod 2)
fi
end proc:
map(f, [$1..100]); # Robert Israel, Aug 08 2016
MATHEMATICA
w = {1, 1, 1}; Select[Range[0, 83], If[# < 2^(Length@ w - 1), True, Take[IntegerDigits[#, 2], Length@ w] != w] &] (* Michael De Vlieger, Aug 08 2016 *)
PROG
(Haskell)
a004765 n = a004765_list !! n
a004765_list = filter f [0..] where
f x | x <= 8 = x /= 7
| otherwise = f (x `div` 2)
-- Reinhard Zumkeller, Jun 03 2012
CROSSREFS
Cf. A007088.
Sequence in context: A356939 A113619 A325114 * A247063 A003726 A343110
KEYWORD
nonn,easy,base
AUTHOR
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 27 07:11 EDT 2024. Contains 372009 sequences. (Running on oeis4.)