Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #18 Aug 26 2015 10:12:07
%S 1,1,4,2,1,0,1,3,1,4,0,1,1,3,1,0,1,2,4,4,0,1,4,2,1,0,1,3,1,4,0,1,1,3,
%T 1,0,1,2,4,4,0,1,4,2,1,0,1,3,1,4,0,1,1,3,1,0,1,2,4,4,0,1,4,2,1,0,1,3,
%U 1,4,0,1,1,3,1,0,1,2,4,4,0,1,4,2,1,0,1
%N n^n (mod 5).
%C For n>0, periodic with period 20 = A174824(5): repeat [1, 4, 2, 1, 0, 1, 3, 1, 4, 0, 1, 1, 3, 1, 0, 1, 2, 4, 4, 0].
%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).
%t Table[PowerMod[n,n,5], {n,0,140}]
%t Join[{1},LinearRecurrence[{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1},{1, 4, 2, 1, 0, 1, 3, 1, 4, 0, 1, 1, 3, 1, 0, 1, 2, 4, 4, 0},86]] (* _Ray Chandler_, Aug 26 2015 *)
%Y Cf. A204689, A174824.
%K nonn,easy
%O 0,3
%A _José María Grau Ribas_, Jan 18 2012