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.

A243912 Numbers n > 1 such that n^k never ends in 2 or more identical digits for any k.

Original entry on oeis.org

3, 5, 6, 7, 9, 15, 16, 18, 21, 23, 24, 25, 26, 27, 29, 32, 35, 36, 41, 43, 45, 46, 47, 49, 51, 56, 57, 61, 63, 65, 67, 68, 69, 74, 75, 76, 81, 82, 83, 85, 86, 87, 89, 93, 95, 96, 101, 103, 105, 106, 107, 109, 115, 116, 118, 121, 123, 124, 125, 126, 127, 129, 132, 135, 136, 141
Offset: 1

Views

Author

Derek Orr, Jun 14 2014

Keywords

Comments

If n = 5^k for some k > 0, then n is in this sequence.
If n is a repdigit, then n is not in this sequence.
For n > 1, n is in this sequence iff n == {1, 3, 5, 6, 7, 9, 15, 16, 18, 21, 23, 24, 25, 26, 27, 29, 32, 35, 36, 41, 43, 45, 46, 47, 49, 51, 56, 57, 61, 63, 65, 67, 68, 69, 74, 75, 76, 81, 82, 83, 85, 86, 87, 89, 93, 95, 96} mod 100

Examples

			5^k ends in 25 for all k > 1. Thus it will never end in any number of identical digits, and 5 is a member of this sequence.
		

Programs

  • Python
    def b(n,p):
      lst = []
      count = 0
      lst1 = []
      for i in range(1,5**(n+2)):
        st = str(p**i)
        if len(st) >= n:
          if int(st[len(st)-n:len(st)]) not in lst:
            lst.append(int(st[len(st)-n:len(st)]))
            lst1.append(i)
          else:
            return len(lst)+min(lst1)
    def a(p):
      for i in range(1,b(2,p)+2):
        st = str(p**i)
        if int(st[len(st)-2:len(st)])%11==0:
          return i
    p = 2
    while p < 200:
      if not a(p):
        print(p,end=', ')
      p += 1