A352206 a(n) = A109812(A352205(n) + 1).
1, 2, 8, 24, 64, 160, 448, 896, 2304, 4608, 11264, 24576, 53248, 106496, 245760, 491520, 1114112, 2228224
Offset: 0
This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
a(6) = 5, which is 101 in binary. Of the terms not among (1,2,4,3,8,5), the earlier terms of the sequence, 10 (decimal) = 1010 (binary) is the smallest positive integer with no common 1-bits with the binary representation of 5. Of the other positive integers not occurring earlier in the sequence (6 = 110 binary, 7 = 111 binary, 9 = 1001 binary), each has at least one 1-bit in common with 5 = 101 in binary. So a(7) = 10. To illustrate the formulas (3) & (4): The powers of two a(3) = 4, a(5) = 8, a(8) = 16, and a(15) = 32 are immediately followed by 3, 5, 6 and 7, respectively, which are the smallest numbers that did not occur earlier. - _M. F. Hasler_, Apr 03 2022
import Data.Bits ((.&.)); import Data.List (delete) a109812 n = a109812_list !! (n-1) a109812_list = f 0 [1..] :: [Int] where f v ws = g ws where g (x:xs) = if v .&. x == 0 then x : f x (delete x ws) else g xs -- Reinhard Zumkeller, Sep 15 2014
read(transforms) : # ANDnos def'd here A109812 := proc(n) option remember; local c,i,known ; if n = 1 then 1; else for c from 1 do known := false ; for i from 1 to n-1 do if procname(i) = c then known := true; break ; end if; end do: if not known and ANDnos(c,procname(n-1)) =0 then return c; end if; end do: end if; end proc: seq(A109812(n),n=1..200) ; # R. J. Mathar, Mar 29 2022
nn = 71; c[] = 0; a[1] = c[1] = 1; u = 2; Do[If[a[i - 1] == u, While[c[u] > 0, u++]]; k = u; While[Nand[c[k] == 0, BitAnd[a[i - 1], k] == 0], k++]; Set[{a[i], c[k]}, {k, i}], {i, 2, nn}]; Array[a, nn] (* _Michael De Vlieger, Apr 05 2022 *)
A109812_vec(n=100, a=0, U=[a])={vector(n, i, my(k=U[1]); while(bitand(a, k++) || setsearch(U, k), ); if(k>U[1]+1, U=setunion(U, [k]), U[1]++); a=k)} \\ M. F. Hasler, Apr 03 2022; corrected Apr 07 2022
A109812_list, l1, s, b = [1], 1, 2, set() for _ in range(10**6): i = s while True: if not (i in b or i & l1): A109812_list.append(i) l1 = i b.add(i) while s in b: b.remove(s) s += 1 break i += 1 # Chai Wah Wu, Jun 04 2018
Comments