%I #14 Apr 09 2023 23:16:06
%S 1,2,4,8,16,6,12,24,22,18,10,20,14,2,4,8,16,6,12,24,22,18,10,20,14,2,
%T 4,8,16,6,12,24,22,18,10,20,14,2,4,8,16,6,12,24,22,18,10,20,14,2,4,8,
%U 16,6,12,24,22,18,10,20,14,2,4,8,16,6,12,24,22,18,10,20,14,2,4,8,16,6,12,24
%N a(n) = 2^n mod 26.
%H <a href="/index/Rec#order_07">Index entries for linear recurrences with constant coefficients</a>, signature (1, 0, 0, 0, 0, -1, 1).
%F From _R. J. Mathar_, Apr 13 2010: (Start)
%F G.f.: (x+2*x^2+4*x^3+8*x^4-10*x^5+7*x^6+13*x^7+1)/((1-x)*(x^2+1)*(x^4-x^2+1)).
%F a(n) = +a(n-1) -a(n-6) +a(n-7) for n>7. (End)
%t PowerMod[2,Range[0,100],26] (* or *) PadRight[{1},100,{14,2,4,8,16,6,12,24,22,18,10,20}] (* _Harvey P. Dale_, Aug 02 2013 *)
%o (Sage) [power_mod(2,n,26)for n in range(0,87)] #
%o (PARI) a(n)=lift(Mod(2,26)^n) \\ _Charles R Greathouse IV_, Mar 22 2016
%K nonn,easy
%O 0,2
%A _Zerinvary Lajos_, Nov 03 2009
|