The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A209466 Final digit of n^n - n. 0

%I #22 Mar 28 2024 09:01:41

%S 1,0,2,4,2,0,0,6,8,0,0,0,4,0,2,0,0,0,6,0,0,0,2,4,2,0,0,6,8,0,0,0,4,0,

%T 2,0,0,0,6,0,0,0,2,4,2,0,0,6,8,0,0,0,4,0,2,0,0,0,6,0,0,0,2,4,2,0,0,6,

%U 8,0,0,0,4,0,2,0,0,0,6,0,0,0,2,4,2,0,0

%N Final digit of n^n - n.

%C Note: cyclic with a period of 20 for n > 0.

%D R. Euler & J. Sadek, "A number that gives the units of n^n", Journal of Recreational Mathematics 29:3 (1998), pp. 203-204.

%H <a href="/index/Rec#order_20">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1).

%F a(n) = (n^n-n) mod 10

%p [seq((n^n-n) mod 10, n=1..40)];

%t Join[{1}, Table[Mod[PowerMod[n, n, 10] - n, 10], {n, 100}]] (* _T. D. Noe_, Mar 13 2012 *)

%t PadRight[{1},120,{0,0,2,4,2,0,0,6,8,0,0,0,4,0,2,0,0,0,6,0}] (* _Harvey P. Dale_, May 21 2020 *)

%o (Perl) print (($_**$_-$_)%10) for (1..40);

%o (PARI) a(n)=lift(Mod(n,10)^n-n) \\ _Charles R Greathouse IV_, Mar 13 2012

%Y Cf. A056849.

%K nonn,easy,base

%O 0,3

%A _Radu Borza_, Mar 09 2012

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 June 7 02:59 EDT 2024. Contains 373140 sequences. (Running on oeis4.)