login
A070513
a(n) = n^4 mod 9.
0
0, 1, 7, 0, 4, 4, 0, 7, 1, 0, 1, 7, 0, 4, 4, 0, 7, 1, 0, 1, 7, 0, 4, 4, 0, 7, 1, 0, 1, 7, 0, 4, 4, 0, 7, 1, 0, 1, 7, 0, 4, 4, 0, 7, 1, 0, 1, 7, 0, 4, 4, 0, 7, 1, 0, 1, 7, 0, 4, 4, 0, 7, 1, 0, 1, 7, 0, 4, 4, 0, 7, 1, 0, 1, 7, 0, 4, 4, 0, 7, 1, 0, 1, 7, 0, 4, 4, 0, 7, 1, 0, 1, 7, 0, 4, 4, 0, 7, 1, 0, 1
OFFSET
0,3
COMMENTS
Equivalently: n^(6*m + 4) mod 9. - G. C. Greubel, Apr 01 2016
FORMULA
From G. C. Greubel, Apr 01 2016: (Start)
a(n) = a(n-9).
a(3*m) = 0.
G.f.: x*(1 +7*x +4*x^3 +4*x^4 +7*x^6 +x^7)/(1-x^9). (End)
MATHEMATICA
PowerMod[Range[0, 100], 4, 9] (* G. C. Greubel, Apr 01 2016 *)
PROG
(Sage) [power_mod(n, 4, 9)for n in range(0, 101)] # Zerinvary Lajos, Oct 30 2009
(Magma) [Modexp(n, 4, 9): n in [0..100]]; // Vincenzo Librandi, Apr 02 2016
(PARI) a(n)=n^4%9 \\ Charles R Greathouse IV, Apr 06 2016
CROSSREFS
Sequence in context: A286193 A021146 A201424 * A065463 A319739 A242780
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, May 13 2002
STATUS
approved