A230024 Final nonzero digit of n^n in base 16.
1, 4, 11, 1, 5, 4, 7, 1, 9, 4, 3, 1, 13, 4, 15, 1, 1, 4, 11, 1, 5, 4, 7, 1, 9, 4, 3, 1, 13, 4, 15, 1, 1, 4, 11, 1, 5, 4, 7, 1, 9, 4, 3, 1, 13, 4, 15, 1, 1, 4, 11, 1, 5, 4, 7, 1, 9, 4, 3, 1, 13, 4, 15, 1, 1, 4, 11, 1, 5, 4, 7, 1, 9, 4, 3, 1, 13, 4, 15, 1, 1
Offset: 1
Links
- Jose María Grau and A. M. Oller-Marcen, On the last digit and the last non-zero digit of n^n in base b, arXiv:1203.4066 [math.NT], 2012.
- Jose María Grau and A. M. Oller-Marcen, On the last digit and the last non-zero digit of n^n in base b, Bull. Korean Math. Soc. 51 (2014), No. 5, pp. 1325-1337.
Programs
-
Mathematica
f[n_, b_] := Module[{m = n^n}, While[Mod[m, b] == 0, m = m/b]; Mod[m, b]]; y = Table[f[i, 16], {i, 1, 100}] Table[Drop[IntegerDigits[n^n,16],-IntegerExponent[n^n,16]][[-1]],{n,100}] (* or *) PadRight[{},100,{1,4,11,1,5,4,7,1,9,4,3,1,13,4,15,1}] (* Harvey P. Dale, Oct 02 2024 *)
Comments