The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A328012 Numbers whose binary representations start and end with 1 and contain an even number of zeros between. 1
1, 3, 7, 9, 15, 19, 21, 25, 31, 33, 39, 43, 45, 51, 53, 57, 63, 67, 69, 73, 79, 81, 87, 91, 93, 97, 103, 107, 109, 115, 117, 121, 127, 129, 135, 139, 141, 147, 149, 153, 159, 163, 165, 169, 175, 177, 183, 187, 189, 195, 197, 201, 207, 209, 215, 219, 221, 225 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Odd members of A059010. - Robert Israel, Nov 30 2019
LINKS
MAPLE
q:= n-> (l-> l[1]=1 and add(1-i, i=l)::even)(Bits[Split](n)):
select(q, [$1..300])[]; # Alois P. Heinz, Oct 04 2019
MATHEMATICA
{1}~Join~Select[Range[3, 225, 2], EvenQ@ DigitCount[#, 2, 0] &] (* Michael De Vlieger, Oct 05 2019 *)
PROG
(PARI) ok(n)={n%2 && hammingweight((2<<logint(n, 2)) - 1 - n)%2==0} \\ Andrew Howroyd, Oct 01 2019
(Python)
n, a = 0, 1
while n < 58:
aa, k = a, 0
while aa > 0:
d, aa = aa%2, aa//2
if d == 0:
k = k+1
if k%2 == 0:
n = n+1
print(n, a)
a = a+2 # A.H.M. Smeets, Oct 04 2019
CROSSREFS
Sequence in context: A187108 A026175 A026139 * A292911 A119681 A197625
KEYWORD
nonn,base
AUTHOR
Justin Clifton, Oct 01 2019
EXTENSIONS
More terms from Alois P. Heinz, Oct 04 2019
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 May 14 23:22 EDT 2024. Contains 372535 sequences. (Running on oeis4.)