A088666 a(n) = (n^4 + 1) mod 10.
1, 2, 7, 2, 7, 6, 7, 2, 7, 2, 1, 2, 7, 2, 7, 6, 7, 2, 7, 2, 1, 2, 7, 2, 7, 6, 7, 2, 7, 2, 1, 2, 7, 2, 7, 6, 7, 2, 7, 2, 1, 2, 7, 2, 7, 6, 7, 2, 7, 2, 1, 2, 7, 2, 7, 6, 7, 2, 7, 2, 1, 2, 7, 2, 7, 6, 7, 2, 7, 2, 1, 2, 7, 2, 7, 6, 7, 2, 7, 2, 1, 2, 7, 2, 7, 6, 7, 2, 7, 2
Offset: 0
Links
- Harvey P. Dale, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (0, 0, 0, 0, 0, 0, 0, 0, 0, 1).
Programs
-
Magma
[(n^4+1) mod 10: n in [0..100]]; // Vincenzo Librandi, Feb 01 2015
-
Mathematica
PowerMod[Range[0,90],4,10]+1 (* or *) PadRight[{},100,{1,2,7,2,7,6,7,2,7,2}] (* Harvey P. Dale, Jan 31 2015 *) LinearRecurrence[{0, 0, 0, 0, 0, 0, 0, 0, 0, 1},{1, 2, 7, 2, 7, 6, 7, 2, 7, 2},90] (* Ray Chandler, Aug 26 2015 *)
Formula
Extensions
Edited by Don Reble, May 03 2006
Name clarified by Vincenzo Librandi, Feb 01 2015
Comments