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!)
A207016 a(1) = 3 , for n > 1 a(n) is the least number greater than a(n-1) such that the Hamming distance D(a(n-1),a(n)) = 3. 4
3, 4, 9, 14, 18, 21, 24, 31, 39, 41, 46, 50, 53, 56, 63, 79, 83, 84, 89, 94, 102, 104, 111, 115, 116, 121, 126, 158, 166, 168, 175, 179, 180, 185, 190, 206, 210, 213, 216, 223, 231, 233, 238, 242, 245, 248, 255, 319, 335, 339, 340, 345, 350, 358, 360, 367, 371 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Odious and evil terms are alternating (cf. A000069, A001969).
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000 (terms 1..1000 from Alois P. Heinz)
MATHEMATICA
a[1] = 3; a[n_] := a[n] = Module[{k = a[n - 1], m = a[n-1] + 1}, While[DigitCount[BitXor[k, m], 2, 1] != 3, m++]; m]; Array[a, 100] (* Amiram Eldar, Aug 06 2023 *)
PROG
(PARI) list(n)=my(v=vector(n)); v[1]=3; for(i=2, n, v[i]=v[i-1]; while(hammingweight(bitxor(v[i-1], v[i]++))!=3, )); v \\ Charles R Greathouse IV, Mar 26 2013
CROSSREFS
Sequence in context: A219043 A342570 A050163 * A333333 A095292 A263821
KEYWORD
nonn,base
AUTHOR
Vladimir Shevelev, 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 March 28 16:05 EDT 2024. Contains 371254 sequences. (Running on oeis4.)