Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #17 Dec 19 2023 13:41:22
%S 0,1,2,0,4,5,0,7,8,0,1,2,0,4,5,0,7,8,0,1,2,0,4,5,0,7,8,0,1,2,0,4,5,0,
%T 7,8,0,1,2,0,4,5,0,7,8,0,1,2,0,4,5,0,7,8,0,1,2,0,4,5,0,7,8,0,1,2,0,4,
%U 5,0,7,8,0,1,2,0,4,5,0,7,8,0,1,2,0,4,5,0,7,8,0,1,2,0,4,5,0,7,8,0,1
%N a(n) = n^7 mod 9.
%H <a href="/index/Rec#order_09">Index entries for linear recurrences with constant coefficients</a>, signature (0, 0, 0, 0, 0, 0, 0, 0, 1).
%t PowerMod[Range[0,100],7,9] (* or *) PadRight[{},101,{0,1,2,0,4,5,0,7,8}] (* _Harvey P. Dale_, May 29 2013 *)
%o (Sage) [power_mod(n,7,9) for n in range(101)] # _Zerinvary Lajos_, Nov 07 2009
%o (PARI) a(n)=n^7%9 \\ _Charles R Greathouse IV_, Apr 06 2016
%K nonn,easy
%O 0,3
%A _N. J. A. Sloane_, May 13 2002