OFFSET
0,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (1,-1,1).
FORMULA
a(n) = 7^n mod 50. [Zerinvary Lajos, Nov 27 2009]
MATHEMATICA
PowerMod[7, Range[0, 70], 100] (* Harvey P. Dale, Jan 23 2012 *)
LinearRecurrence[{1, -1, 1}, {1, 7, 49}, 70] (* Harvey P. Dale, May 09 2018 *)
PROG
(Sage) [power_mod(7, n, 50)for n in range(0, 80)] # Zerinvary Lajos, Nov 27 2009
(PARI) a(n)=lift(Mod(7, 100)^n) \\ Charles R Greathouse IV, Jan 02 2013
(Magma) [Modexp(7, n, 100): n in [0..110]]; // Vincenzo Librandi, Aug 16 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved