A244187 Numbers n not divisible by 10 such that, for some k, n^k can end in a repdigit of any length.
53, 71, 77, 133, 177, 213, 231, 237, 273, 311, 317, 373, 391, 397, 453, 471, 477, 497, 533, 613, 631, 637, 711, 717, 773, 791, 797, 817, 853, 871, 877, 913, 933, 1013, 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
Offset: 1
Examples
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.
Crossrefs
Cf. A243977.
Programs
-
PARI
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))) a2(n,p)=for(i=1,10^p,v=digits((n^i)%10^p);if(#v==p&&vecmin(v)==vecmax(v),return(vecmin(v)))) 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)))} n=1;while(n<2000,if(seq(n),print1(n,", "));n++)
Comments