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!)
A207063 a(n) is the smallest number larger than a(n-1) with mutual Hamming distance 2 and a(1)=0. 5
0, 3, 5, 6, 10, 12, 15, 23, 27, 29, 30, 46, 54, 58, 60, 63, 95, 111, 119, 123, 125, 126, 190, 222, 238, 246, 250, 252, 255, 383, 447, 479, 495, 503, 507, 509, 510, 766, 894, 958, 990, 1006, 1014, 1018, 1020, 1023, 1535, 1791, 1919, 1983, 2015, 2031, 2039, 2043 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
The binary expansion of a(n) has an even number of 1's. So this is a subsequence of A001969. The odd analog is A206853.
This sequence has 4*k+1 = A016813(k) numbers with exactly 2*k 1's and no number with more than two 0's in their binary expansion.
LINKS
EXAMPLE
| n | a(n) | A007088(a(n))| A000120(a(n))|
+---+------+--------------+--------------+
| 1 | 0 | 0 | 0 |
| 2 | 3 | 11 | 2 |
| 3 | 5 | 101 | 2 |
| 4 | 6 | 110 | 2 |
| 5 | 10 | 1010 | 2 |
| 6 | 12 | 1100 | 2 |
| 7 | 15 | 1111 | 4 |
| 8 | 23 | 10111 | 4 |
MAPLE
g:= proc(n) option remember; local l; l:= g(n-1);
`if`(nops(l)=1, [l[1]+1, l[1]-1], `if`(nops(l)=2,
`if`(l[2]<>0, [l[1], l[2]-1], [l[1]+1, 0, l[1]-1]),
`if`(l[3]<>1, [l[1], l[2], l[3]-1], [l[1]])))
end: g(1):= [2, 0, 1]:
a:= n-> (l-> 2^l[1]-1 -add(2^l[i], i=2..nops(l)))(g(n)):
seq(a(n), n=1..300);
PROG
(Python)
def aupton(terms):
alst = [0]
for n in range(2, terms+1):
an = alst[-1] + 1
while bin(an^alst[-1]).count('1') != 2: an += 1
alst.append(an)
return alst
print(aupton(54)) # Michael S. Branicky, Jul 07 2021
CROSSREFS
Cf. A182187 (next with Hamming distance 2), A206853 (iterate from 1).
Sequence in context: A099190 A122772 A140449 * A359584 A230851 A334101
KEYWORD
nonn,base
AUTHOR
Alois P. Heinz, Feb 14 2012
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 28 14:43 EDT 2024. Contains 372088 sequences. (Running on oeis4.)