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-5 of 5 results.

A020666 a(n)^n is the least n-th power containing every digit.

Original entry on oeis.org

1023456789, 32043, 2326, 763, 309, 159, 56, 104, 49, 36, 25, 15, 25, 17, 17, 15, 16, 7, 5, 6, 6, 5, 11, 9, 14, 5, 5, 5, 5, 9, 5, 8, 11, 4, 4, 6, 5, 7, 3, 5, 4, 4, 6, 4, 3, 6, 3, 3, 4, 4, 5, 4, 3, 6, 4, 4, 3, 4, 4, 3, 3, 3, 3, 3, 3, 4, 3, 2, 3, 2, 3, 3, 3, 3, 4, 3, 3, 3, 2, 3, 4, 2, 3, 2, 3, 3, 2, 2, 2
Offset: 1

Views

Author

Keywords

Comments

It is extremely probable that a(n) = 2 for all n >= 169.

Crossrefs

Programs

  • Python
    def a(n):
        if n == 1: return 1023456789
        an = 2
        while not(len(set(str(an**n))) == 10): an += 1
        return an
    print([a(n) for n in range(1, 90)]) # Michael S. Branicky, Jul 04 2021

A020667 Least n-th power containing every digit.

Original entry on oeis.org

1023456789, 1026753849, 12584301976, 338920744561, 2817036000549, 16157819263041, 1727094849536, 13685690504052736, 1628413597910449, 3656158440062976, 2384185791015625, 129746337890625, 1490116119384765625, 168377826559400929, 2862423051509815793
Offset: 1

Views

Author

Keywords

Comments

It is extremely probable that a(n) = 2^n for all n >= 169.

Crossrefs

Programs

  • Python
    def a(n):
        if n == 1: return 1023456789
        a020667n = 2
        while not(len(set(str(a020667n**n))) == 10): a020667n += 1
        return a020667n**n
    print([a(n) for n in range(1, 16)]) # Michael S. Branicky, Jul 04 2021

Formula

a(n) = A020666(n)^n. - Seiichi Manyama, Dec 05 2024

A112388 a(n) is the smallest prime p such that p^n contains every digit.

Original entry on oeis.org

10123457689, 101723, 5437, 2339, 1009, 257, 139, 173, 83, 67, 31, 29, 37, 17, 17, 47, 19, 7, 5, 23, 23, 5, 11, 11, 17, 5, 5, 5, 5, 11, 5, 11, 11, 5, 5, 7, 5, 7, 3, 5, 5, 7, 7, 7, 3, 7, 3, 3, 5, 5, 5, 5, 3, 7, 7, 5, 3, 7, 5, 3, 3, 3, 3, 3, 3, 5, 3, 2, 3, 2, 3, 3, 3, 3, 5, 3, 3, 3, 2, 3, 5, 2
Offset: 1

Views

Author

Tanya Khovanova, Dec 05 2005

Keywords

Comments

Conjecture: a(n)=2 for all n>168. Checked up to n = 20000. - Robert Israel, Aug 28 2020

Crossrefs

Programs

  • Maple
    f:= proc(n) local k;
      k:= 1:
      do k:= nextprime(k);
        if convert(convert(k^n,base,10),set) = {$0..9} then return k fi
      od
    end proc:
    f(1):= 10123457689:
    map(f, [$1..100]); # Robert Israel, Aug 28 2020
  • Mathematica
    f[n_] := Block[{k = 1}, While[ Union@IntegerDigits[ Prime[k]^n] != {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}, k++ ]; Prime[k]]; Array[f, 82] (* Robert G. Wilson v, Dec 06 2005 *)
  • Python
    from sympy import nextprime
    def a(n):
        if n == 1: return 10123457689
        p = 2
        while not(len(set(str(p**n))) == 10): p = nextprime(p)
        return p
    print([a(n) for n in range(1, 83)]) # Michael S. Branicky, Jul 04 2021

Extensions

More terms from Robert G. Wilson v, Dec 06 2005

A240069 The number n^k has all 10 decimal digits starting at k = a(n), or a(n) = 0 if 10 digits are not possible.

Original entry on oeis.org

0, 169, 107, 85, 66, 65, 62, 57, 54, 0, 42, 52, 38, 35, 35, 43, 28, 26, 45, 169, 30, 25, 51, 24, 30, 32, 29, 29, 46, 107, 29, 19, 25, 35, 19, 33, 26, 18, 42, 85, 24, 20, 21, 30, 40, 33, 16, 30, 17, 66, 30, 30, 31, 19, 18, 34, 20, 32, 28, 65, 27, 20, 25, 29, 18, 16
Offset: 1

Views

Author

T. D. Noe, Apr 01 2014

Keywords

Comments

It appears that numbers of the form 2 * 10^i have the longest period, 169.

Crossrefs

Cf. A137214 (number of distinct decimal digits in 2^n).

Programs

  • Mathematica
    mx = 1000; Table[s = Table[Length[Union[IntegerDigits[n^k]]], {k, 0, mx}]; pos = Position[s, 10]; If[pos == {}, 0, 1 + mx - Position[Differences[Reverse[s]], _?(# != 0 &)][[1, 1]]], {n, 100}]

A309432 Number of distinct digits in decimal representation of n^2.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 2, 3, 3, 3, 3, 2, 2, 2, 3, 3, 3, 2, 3, 3, 3, 2, 3, 4, 4, 3, 3, 4, 4, 2, 3, 3, 3, 4, 4, 4, 3, 3, 3, 4, 4, 3, 4, 4, 4, 4, 4, 3, 4, 3, 4, 3, 4, 3, 3, 4, 3, 4, 3, 3, 4, 3, 4, 4, 4, 4, 3, 3, 3, 4, 4, 3, 3, 4, 3, 4, 3, 4
Offset: 0

Views

Author

Hauke Löffler, Aug 01 2019

Keywords

Examples

			a(0) = 1 because 0^2 = 0 has 1 distinct digit (0).
a(5) = 2 because 5^2 = 25 has 2 distinct digits (2, 5).
a(10) = 2 because 10^2 = 100 has 2 distinct digits (0, 1).
		

Crossrefs

Programs

Showing 1-5 of 5 results.