login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A260031 Final nonzero digit of n^n in base 12. 1
1, 4, 3, 4, 5, 3, 7, 4, 9, 4, 11, 1, 1, 4, 3, 4, 5, 3, 7, 4, 9, 4, 11, 4, 1, 4, 3, 4, 5, 3, 7, 4, 9, 4, 11, 9, 1, 4, 3, 4, 5, 3, 7, 4, 9, 4, 11, 4, 1, 4, 3, 4, 5, 3, 7, 4, 9, 4, 11, 1, 1, 4, 3, 4, 5, 3, 7, 4, 9, 4, 11, 9, 1, 4, 3, 4, 5, 3, 7, 4, 9, 4, 11, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
José María Grau and Antonio M. Oller-Marcén, On the last digit and the last non-zero digit of n^n in base b, arXiv preprint arXiv:1203.4066 [math.NT], 2012.
PROG
(Python)
from gmpy2 import mpz, digits
def A260031(n):
s = digits(mpz(n)**mpz(n), 12)
t = s[-1]
while t == '0':
s = s[:-1]
t = s[-1]
return int(t, 12) # Chai Wah Wu, Jul 19 2015
(Haskell)
import Math.NumberTheory.Moduli (powerMod)
a260031 n = if x > 0 then x else f $ div (n ^ n) 12
where x = powerMod n n 12
f z = if m == 0 then f z' else m
where (z', m) = divMod z 12
-- Reinhard Zumkeller, Jul 19 2015
CROSSREFS
Sequence in context: A109382 A342843 A090369 * A132293 A205398 A135103
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Jul 19 2015
EXTENSIONS
More terms from Chai Wah Wu, Jul 19 2015
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 29 08:13 EDT 2024. Contains 371265 sequences. (Running on oeis4.)