login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A243911 Least number k such that n^k ends in two identical digits, or 0 if no such number exists. 2
18, 0, 9, 0, 0, 0, 6, 0, 2, 1, 2, 17, 3, 0, 0, 11, 0, 5, 2, 0, 1, 0, 0, 0, 0, 0, 14, 0, 2, 7, 0, 1, 7, 0, 0, 7, 2, 5, 2, 0, 3, 0, 1, 0, 0, 0, 9, 0, 2, 0, 18, 3, 9, 1, 0, 0, 6, 5, 2, 0, 2, 0, 3, 0, 1, 0, 0, 0, 2, 3, 7, 11, 0, 0, 0, 1, 14, 5, 2, 0, 0, 0, 7, 0, 0, 0, 1, 0, 2, 9, 3, 0, 11 (list; graph; refs; listen; history; text; internal format)
OFFSET
2,1
COMMENTS
For all n > 1, the 2-digit ending of n^k repeats itself after a certain k-value. Thus a(n) = 0 is definite.
a(10*n) = 2 for all n > 0. Thus there are infinitely many nonzero entries. a(5^n) = 0 for all n > 0. Thus there are infinitely many zero entries.
LINKS
EXAMPLE
2^18 = 262144 ends in two of the same digit. Thus a(2) = 18.
PROG
(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 < 100:
..if a(p):
....print(a(p), end=', ')
..else:
....print(0, end=', ')
..p += 1
CROSSREFS
Sequence in context: A214359 A198810 A347532 * A289660 A096306 A335187
KEYWORD
nonn,base
AUTHOR
Derek Orr, Jun 14 2014
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 9 10:59 EDT 2024. Contains 372350 sequences. (Running on oeis4.)