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.

A061280 Smallest base b >= 2 for which b^n contains n as a substring.

Original entry on oeis.org

10, 5, 7, 7, 5, 2, 3, 7, 3, 2, 11, 7, 6, 25, 7, 11, 4, 8, 5, 7, 6, 6, 6, 3, 4, 9, 17, 3, 6, 13, 8, 5, 8, 5, 2, 2, 2, 8, 6, 6, 5, 4, 7, 2, 6, 9, 8, 6, 2, 4, 2, 8, 6, 5, 5, 5, 3, 8, 4, 2, 3, 3, 6, 5, 6, 12, 2, 6, 3, 5, 3, 2, 2, 6, 5, 6, 3, 3, 4, 3, 4, 2, 3, 4, 2, 4, 3, 7, 2, 8, 8, 4, 2, 6, 3, 4, 7, 6, 7, 7
Offset: 1

Views

Author

Erich Friedman, Jun 06 2001

Keywords

Examples

			a(3) = 7 since 7^1 contains no 1, 7^2 contains no 2 and 7^3 contains a 3.
		

Programs

  • Maple
    a:= proc(n) local b; for b from 2 while
          searchtext(""||n, ""||(b^n))=0 do od; b
        end:
    seq(a(n), n=1..100);  # Alois P. Heinz, Sep 28 2016
  • Mathematica
    Table[b = 2; While[Length@ SequencePosition[IntegerDigits[b^n], IntegerDigits[n]] == 0, b++]; b, {n, 120}] (* Michael De Vlieger, Sep 28 2016, Version 10.1 *)
  • Python
    def a(n):
        b, s = 2, str(n)
        while s not in str(b**n): b += 1
        return b
    print([a(n) for n in range(1, 101)]) # Michael S. Branicky, Oct 05 2021