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.

A244187 Numbers n not divisible by 10 such that, for some k, n^k can end in a repdigit of any length.

This page as a plain text file.
%I A244187 #28 Nov 14 2022 23:04:36
%S A244187 53,71,77,133,177,213,231,237,273,311,317,373,391,397,453,471,477,497,
%T A244187 533,613,631,637,711,717,773,791,797,817,853,871,877,913,933,1013,
%U A244187 1031,1037,1111,1117,1137,1173,1191,1197,1233,1253,1271,1277,1333,1413,1431,1437,1511,1517,1553,1573,1591,1597,1653,1671,1677,1733,1777,1813,1831,1837,1873,1911,1917,1973,1991,1997
%N A244187 Numbers n not divisible by 10 such that, for some k, n^k can end in a repdigit of any length.
%C A244187 Trivially, (10*m)^k can end in any number of zeros. Thus numbers divisible by 10 are not included in this sequence.
%C A244187 This sequence contains only numbers that end in a 1, 3, or 7.
%C A244187 Those that end in 1 are congruent to {71, 231, 311, 391} (mod 400).
%C A244187 Those that end in 3 are congruent to {53, 133, 213, 373} (mod 400) or are a subsequence of 273 mod 320 (for n < 2000, only 593 == 273 (mod 320) but it is not a term of this sequence).
%C A244187 Those that end in 7 are congruent to {77, 237, 317, 397} (mod 400) or are a subsequence of 177 (mod 320) (for n < 2000, only 1457 == 177 (mod 320) but it is not a term of this sequence).
%C A244187 If a(n) ends in a 1, then a(n+1) ends in a 7 and a(n+1) = a(n)+6. Note that the converse is not true.
%C A244187 Fix an M large enough. There exist infinitely many k such that a(n)^k ends in M of the same digit. Those k values can be given as X mod Y for some X and Y. Take two consecutive powers k and k' that satisfy this. Let the digit immediately before the repeating digit in a(n)^k be called D and the digit immediately before the repeating digit in a(n)^k' be called D'. D - D' will always be odd for large enough M. Example: M = 4 and a(n) = 71. 71^k ends in 4 ones for k = 13, 263, 513, 763, ... == 13 (mod 250). Taking k = 13 and k' = 263, 71^13 ends in 31111 and 71^263 ends in 61111. Thus, D = 3 and D' = 6, and we see 3 - 6 is odd.
%e A244187 53^9 ends in 33. 53^29 ends in 333. 53^529 ends in 3333. 53^4529 ends in 33333. 53^49529 ends in 333333. This can continue for any number of 3's, where the exponent of 53 is some function based on how many 3's are at the end. We see f(2) = 9, f(3) = 29, f(4) = 529, f(5) = 4529, f(6) = 49529, and so on. Thus 53 is a term of this sequence.
%o A244187 (PARI)
%o A244187 a1(n,p,m)=hh=0;for(i=1,10^p,st=(n^i)%10^p;w=digits(st);sb=(n^i)%10^(p+1);if(#w==p&&vecmin(w)==vecmax(w),hh++);if(hh==m,return((sb-st)/10^p)))
%o A244187 a2(n,p)=for(i=1,10^p,v=digits((n^i)%10^p);if(#v==p&&vecmin(v)==vecmax(v),return(vecmin(v))))
%o A244187 seq(n)={p=3;while(p<10,if(!a2(n,p),return(0));aa=a1(n,p,3);di1=aa-a1(n,p,2);di2=aa-a2(n,p);if(di1==Mod(0,2)&&di2==Mod(1,2),return(0));if(di1==Mod(0,2)&&di2==Mod(0,2),p++);if(di1==Mod(1,2),return(1)))}
%o A244187 n=1;while(n<2000,if(seq(n),print1(n,", "));n++)
%Y A244187 Cf. A243977.
%K A244187 nonn,base
%O A244187 1,1
%A A244187 _Derek Orr_, Jun 21 2014