A243912 Numbers n > 1 such that n^k never ends in 2 or more identical digits for any k.
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
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
Comments