login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A143959 Final digit of n^(n+1)-(n+1)^n for n>2 0
7, 9, 9, 7, 9, 7, 1, 9, 3, 1, 5, 9, 9, 5, 1, 1, 1, 9, 9, 9, 7, 9, 9, 7, 9, 7, 1, 9, 3, 1, 5, 9, 9, 5, 1, 1, 1, 9, 9, 9, 7, 9, 9, 7, 9, 7, 1, 9, 3, 1, 5, 9, 9, 5, 1, 1, 1, 9, 9, 9, 7, 9, 9, 7, 9, 7, 1, 9, 3, 1, 5, 9, 9, 5, 1, 1, 1, 9, 9, 9, 7, 9, 9, 7, 9, 7, 1, 9, 3, 1, 5, 9, 9, 5, 1, 1, 1, 9, 9, 9 (list; graph; refs; listen; history; internal format)
OFFSET

3,1

COMMENTS

Cyclic with a period of 20

FORMULA

a(n) = (1/190)*{25*(n mod 20) + 6*[(n + 1)mod 20] + 6*[(n + 2)mod 20] - 70*[(n + 3)mod 20] + 6*[(n + 4)mod 20] + 6*[(n + 5)mod 20] + 44*[(n + 6)mod 20] + 44*[(n + 7)mod 20] + 6*[(n + 8)mod 20] - 32*[(n + 9)mod 20] - 32*[(n + 10)mod 20] + 25*[(n + 11)mod 20] + 63*[(n + 12)mod 20] - 70*[(n + 13)mod 20] + 63*[(n + 14)mod 20] + 25*[(n + 15)mod 20] - 13*[(n + 16)mod 20] + 25*[(n + 17)mod 20] + 6*[(n + 18)mod 20] - 13*[(n + 19)mod 20]}, with n>= 0 [From Paolo P. Lava (paoloplava(AT)gmail.com), Sep 19 2008]

MATHEMATICA

Last[IntegerDigits[#^(#+1)-(#+1)^#]]&/@ Range[3, 150]  (* From Harvey P. Dale, Mar 12 2011 *)

PROG

(Python) # -*- coding: iso-8859-1 -*- from math import * n=3 while n<100: ....r=(n**(n+1)-(n+1)**n)%10 ....print r, ....n=n+1

CROSSREFS

A056849

Sequence in context: A198753 A175642 A199386 * A121313 A111204 A000510

Adjacent sequences:  A143956 A143957 A143958 * A143960 A143961 A143962

KEYWORD

base,easy,nonn

AUTHOR

Sebastien Dumortier (sdumortier(AT)ac-limoges.fr), Sep 05 2008

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 15 23:53 EST 2012. Contains 205860 sequences.