%I #17 Dec 27 2023 11:25:36
%S 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,0,1,2,3,4,5,6,7,
%T 8,9,10,11,12,13,14,15,16,17,18,19,20,0,1,2,3,4,5,6,7,8,9,10,11,12,13,
%U 14,15,16,17,18,19,20,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20
%N n^7 mod 21.
%C Equivalently: n^(6*m+7) mod 21. - _G. C. Greubel_, Jun 04 2016
%H <a href="/index/Rec#order_21">Index entries for linear recurrences with constant coefficients</a>, signature (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1).
%F a(n) = a(n-21). - _R. J. Mathar_, Sep 30 2013
%t PowerMod[Range[0, 90], 7, 21] (* or *) PadRight[{},90,Range[0,20]] (* _Harvey P. Dale_, Apr 21 2012 *)
%o (Sage) [power_mod(n,7,21)for n in range(0, 85)] #
%o (PARI) a(n)=n^7%21 \\ _Charles R Greathouse IV_, Apr 06 2016
%K nonn,easy
%O 0,3
%A _Zerinvary Lajos_, Oct 28 2009
|