Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #34 Dec 18 2023 14:29:00
%S 1,3,9,27,23,11,4,12,7,21,5,15,16,19,28,26,20,2,6,18,25,17,22,8,24,14,
%T 13,10,1,3,9,27,23,11,4,12,7,21,5,15,16,19,28,26,20,2,6,18,25,17,22,8,
%U 24,14,13,10,1,3,9,27,23,11,4,12,7,21,5,15,16,19,28
%N a(n) = 3^n mod 29.
%H G. C. Greubel, <a href="/A070344/b070344.txt">Table of n, a(n) for n = 0..1000</a>
%H <a href="/index/Rec#order_15">Index entries for linear recurrences with constant coefficients</a>, signature (1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 1).
%F a(n) = a(n-28). - _G. C. Greubel_, Mar 12 2016
%t PowerMod[3, Range[0, 50], 29] (* _G. C. Greubel_, Mar 12 2016 *)
%o (Sage) [power_mod(3,n,29)for n in range(0, 71)] # _Zerinvary Lajos_, Nov 25 2009
%o (PARI) a(n)=lift(Mod(3,29)^n) \\ _Charles R Greathouse IV_, Mar 22 2016
%K nonn,easy
%O 0,2
%A _N. J. A. Sloane_, May 12 2002