login
a(n) = 4^n mod 19.
2

%I #25 Mar 18 2024 19:48:25

%S 1,4,16,7,9,17,11,6,5,1,4,16,7,9,17,11,6,5,1,4,16,7,9,17,11,6,5,1,4,

%T 16,7,9,17,11,6,5,1,4,16,7,9,17,11,6,5,1,4,16,7,9,17,11,6,5,1,4,16,7,

%U 9,17,11,6,5,1,4,16,7,9,17,11,6,5,1,4,16,7,9,17,11,6,5

%N a(n) = 4^n mod 19.

%C Period 9: repeat (1,4,16,7,9,17,11,6,5).

%C Also continued fraction expansion of (13140908+sqrt(323139488118562))/24969762. - _Bruno Berselli_, Sep 09 2011

%H Vincenzo Librandi, <a href="/A187532/b187532.txt">Table of n, a(n) for n = 0..1000</a>

%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).

%F a(n+9) = a(n).

%F G.f.: (1 + 4*x + 16*x^2 + 7*x^3 + 9*x^4 + 17*x^5 + 11*x^6 + 6*x^7 + 5*x^8)/((1-x)*(1+x+x^2)*(1+x^3+x^6)). - _Bruno Berselli_, Sep 09 2011

%t PowerMod[4, Range[0, 100], 19] (* or *)

%t PadRight[{}, 100, {1, 4, 16, 7, 9, 17, 11, 6, 5}] (* _Paolo Xausa_, Mar 17 2024 *)

%o (Magma) [4^n mod 19 : n in [0..80]]; // _Vincenzo Librandi_, Sep 09 2011

%o (PARI) a(n)=lift(Mod(4,19)^n) \\ _Charles R Greathouse IV_, Mar 22 2016

%Y Cf. A036120, A070342, A070373, A070395, A070421.

%K nonn,easy

%O 0,2

%A _M. F. Hasler_, Mar 10 2011