A070593 a(n) = n^5 mod 7.
0, 1, 4, 5, 2, 3, 6, 0, 1, 4, 5, 2, 3, 6, 0, 1, 4, 5, 2, 3, 6, 0, 1, 4, 5, 2, 3, 6, 0, 1, 4, 5, 2, 3, 6, 0, 1, 4, 5, 2, 3, 6, 0, 1, 4, 5, 2, 3, 6, 0, 1, 4, 5, 2, 3, 6, 0, 1, 4, 5, 2, 3, 6, 0, 1, 4, 5, 2, 3, 6, 0, 1, 4, 5, 2, 3, 6, 0, 1, 4, 5, 2, 3, 6, 0, 1, 4, 5, 2, 3, 6, 0, 1, 4, 5, 2, 3, 6, 0, 1, 4
Offset: 0
Links
- Index entries for linear recurrences with constant coefficients, signature (0,0,0,0,0,0,1).
Programs
-
Mathematica
Table[If[Mod[n, 7] == 0, 0, ModularInverse[n, 7]], {n, 0, 100}] (* Jean-François Alcover, May 03 2017 *) PowerMod[Range[0,100],5,7] (* Harvey P. Dale, Dec 16 2024 *)
-
PARI
a(n)=n^5%7 \\ Charles R Greathouse IV, Apr 06 2016
-
Sage
[power_mod(n,5,7)for n in range(0, 101)] # Zerinvary Lajos, Nov 07 2009
-
Sage
[power_mod(n,11,7)for n in range(0, 101)] # Zerinvary Lajos, Nov 07 2009
Comments