|
|
A261461
|
|
a(n) is the smallest nonzero number that is not a substring of n in its binary representation.
|
|
16
|
|
|
1, 2, 3, 2, 3, 3, 4, 2, 3, 3, 3, 4, 5, 4, 4, 2, 3, 3, 3, 5, 3, 3, 4, 4, 5, 5, 4, 4, 5, 4, 4, 2, 3, 3, 3, 5, 3, 3, 5, 5, 3, 3, 3, 4, 7, 4, 4, 4, 5, 5, 5, 5, 7, 4, 4, 4, 5, 5, 4, 4, 5, 4, 4, 2, 3, 3, 3, 5, 3, 3, 5, 5, 3, 3, 3, 6, 5, 7, 5, 5, 3, 3, 3, 6, 3, 3
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
COMMENTS
|
|
|
LINKS
|
|
|
FORMULA
|
|
|
MATHEMATICA
|
fQ[m_, n_] := Block[{g}, g[x_] := ToString@ FromDigits@ IntegerDigits[x, 2]; StringContainsQ[g@ n, g@ m]]; Table[k = 1; While[fQ[k, n] && k < n, k++]; k, {n, 85}] (* Michael De Vlieger, Sep 21 2015 *)
|
|
PROG
|
(Haskell)
import Data.List (isInfixOf)
a261461 x = f $ tail a030308_tabf where
f (cs:css) = if isInfixOf cs (a030308_row x)
then f css else foldr (\d v -> 2 * v + d) 0 cs
(Python)
from itertools import count
def a(n):
b, k = bin(n)[2:], 1
return next(k for k in count(1) if bin(k)[2:] not in b)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|