cp's OEIS Frontend

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.

Showing 1-3 of 3 results.

A261461 a(n) is the smallest nonzero number that is not a substring of n in its binary representation.

Original entry on oeis.org

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
Offset: 0

Views

Author

Reinhard Zumkeller, Aug 30 2015

Keywords

Comments

A261018(n) = a(A260273(n)).
Is a(n) = A091460(n) for n>1? - R. J. Mathar, Sep 02 2015. The lowest counterexample occurs at a(121) = 5 < 6 = A091460(121). - Álvar Ibeas, Sep 08 2020
a(A062289(n))=A261922(A062289(n)); a(A126646(n))!=A261922(A126646(n)). - Reinhard Zumkeller, Sep 17 2015

Crossrefs

Cf. A007088, A030308, A260273, A261018; record values and where they occur: A261466, A261467.
See A261922 for a variant.

Programs

  • 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
    
  • 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 *)
  • 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)
    print([a(n) for n in range(86)]) # Michael S. Branicky, Feb 26 2023

Formula

a(n) = A144016(n) + 1 for any n > 0. - Rémy Sigrist, Mar 10 2018

A261467 Where records occur in A261461.

Original entry on oeis.org

0, 1, 2, 6, 12, 44, 92, 184, 1208, 1256, 4792, 9912, 19832, 39664, 563952, 576464, 4496112, 4499184, 17996528, 17997488, 143972080, 145057520, 145070832, 294967024, 589944560, 1179889136, 2359778272, 71079255008, 72019201952
Offset: 1

Views

Author

Reinhard Zumkeller, Aug 30 2015

Keywords

Comments

A261461(a(n)) = A261466(n).

Crossrefs

Programs

  • C
    See Links section.
    
  • Haskell
    a261467 n = a261467_list !! (n-1)
    -- where a261467_list is defined in A261466.
    
  • Python
    from itertools import count, islice
    def f(n):
        b, k = bin(n)[2:], 1
        return next(k for k in count(1) if bin(k)[2:] not in b)
    def agen(record=-1):
        yield from (((record:=f(k)), k)[1] for k in count(0) if f(k) > record)
    print(list(islice(agen(), 18))) # Michael S. Branicky, Feb 26 2023

Extensions

Leading zero and more terms from Rémy Sigrist, Mar 10 2018
a(26)-a(29) from Rémy Sigrist, Feb 26 2023

A262360 Fixed points of A262356 and of A262358.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 42, 4410, 3060996
Offset: 1

Views

Author

Reinhard Zumkeller, Sep 19 2015

Keywords

Comments

A261466(a(n)) = a(n).

Crossrefs

Programs

  • Haskell
    a262360 n = a262360_list !! (n-1)
    a262360_list = [x | x <- [1..], a262356 x == x]

Extensions

a(15) from Alois P. Heinz, Sep 20 2015
Showing 1-3 of 3 results.