A244188 Numbers n such that the digit that repeats the most at the end of n^k for some k is not the last digit of n.
2, 12, 22, 33, 37, 42, 52, 62, 72, 73, 77, 92, 102, 112, 113, 117, 122, 142, 152, 153, 162, 172, 192, 197, 202, 212, 222, 233, 237, 242, 252, 262, 272, 273, 277, 292, 302, 312, 313, 317, 322, 342, 352, 353, 362, 372, 392, 397, 402, 412, 422, 433, 437, 442, 452, 462, 472
Offset: 1
Examples
2^k ends in 2 of the same digit for k = 18 mod 20 (last digit is 4) and 19 mod 20 (last digit is 8). 2^k ends in 3 of the same digit for k = 39 mod 100 (last digit is 8). Since 8 is the only possibility, 8 must remain the only possibility for any larger run of identical digits. Since 8 is not the last digit of 2, then 2 is a member of this sequence. 33^k ends in 2 of the same digit for k = 1 mod 20 (last digit is 3) and 7 mod 20 (last digit is 7). 33^k ends in 3 of the same digit for k = 87 mod 100 (last digit is 7). Since 7 is the only possibility, 7 must remain the only possibility for any larger run of identical digits. Since 7 is not the last digit of 33, 33 is a member of this sequence.
Programs
-
PARI
seq(n)=for(m=2,6,cc=0;for(i=10^(m-1),10^m,st1=(n^i)%10^m;b="";for(j=1,m,b=concat(b,"1"));if(st1%eval(b)==0,for(d=i+1,10^m,sb1=(n^d)%10^m;if(sb1%eval(b)==0,if(sb1%10==st1%10,return(st1%10));if(sb1%10!=st1%10,cc++;break)))));if(cc==0,return(n%10))) n=1;while(n<1000,if(seq(n)!=n%10,print1(n,", "));n++)
Comments