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.

A243911 Least number k such that n^k ends in two identical digits, or 0 if no such number exists.

This page as a plain text file.
%I A243911 #7 May 22 2025 10:21:38
%S A243911 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,
%T A243911 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,
%U A243911 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
%N A243911 Least number k such that n^k ends in two identical digits, or 0 if no such number exists.
%C A243911 For all n > 1, the 2-digit ending of n^k repeats itself after a certain k-value. Thus a(n) = 0 is definite.
%C A243911 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.
%e A243911 2^18 = 262144 ends in two of the same digit. Thus a(2) = 18.
%o A243911 (Python)
%o A243911 def b(n,p):
%o A243911   lst = []
%o A243911   count = 0
%o A243911   lst1 = []
%o A243911   for i in range(1,5**(n+2)):
%o A243911     st = str(p**i)
%o A243911     if len(st) >= n:
%o A243911       if int(st[len(st)-n:len(st)]) not in lst:
%o A243911         lst.append(int(st[len(st)-n:len(st)]))
%o A243911         lst1.append(i)
%o A243911       else:
%o A243911         return len(lst)+min(lst1)
%o A243911 def a(p):
%o A243911   for i in range(1,b(2,p)+2):
%o A243911     st = str(p**i)
%o A243911     if int(st[len(st)-2:len(st)])%11==0:
%o A243911       return i
%o A243911 p = 2
%o A243911 while p < 100:
%o A243911   if a(p):
%o A243911     print(a(p),end=', ')
%o A243911   else:
%o A243911     print(0,end=', ')
%o A243911   p += 1
%Y A243911 Cf. A005054, A216099.
%K A243911 nonn,base
%O A243911 2,1
%A A243911 _Derek Orr_, Jun 14 2014