A271378 a(n) = 5^n mod 31.
1, 5, 25, 1, 5, 25, 1, 5, 25, 1, 5, 25, 1, 5, 25, 1, 5, 25, 1, 5, 25, 1, 5, 25, 1, 5, 25, 1, 5, 25, 1, 5, 25, 1, 5, 25, 1, 5, 25, 1, 5, 25, 1, 5, 25, 1, 5, 25, 1, 5, 25, 1, 5, 25, 1, 5, 25, 1, 5, 25, 1, 5, 25, 1, 5, 25, 1, 5, 25, 1, 5, 25, 1, 5, 25, 1, 5, 25
Offset: 0
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (0,0,1).
Crossrefs
Cf. similar sequences of the type 5^n mod p, where p is a prime: A070365 (p=7), A070367 (p=11), A070368 (p=13), A070371 (p=17), A070373 (p=19), A036121 (p=23), A070379 (p=29), this sequence (p=31), A070384 (p=37), A070387 (p=41), A070389 (p=43), A036127 (p=47), A036133 (p=73), A036137 (p=97), A271379 (p=101), A036139 (p=103), A036149 (p=157), A271380 (p=163) A036151 (p=167), A036156 (p=193).
Programs
-
Magma
[Modexp(5, n, 31): n in [0..100]];
-
Magma
&cat [[1,5,25]^^30]; // Bruno Berselli, Apr 07 2016
-
Maple
seq(op([1, 5, 25]), n=0..50); # Wesley Ivan Hurt, Jun 30 2016
-
Mathematica
PowerMod[5, Range[0, 100], 31]
-
PARI
x='x+O('x^99); Vec((1+5*x+25*x^2)/(1-x^3)) \\ Altug Alkan, Apr 06 2016
Formula
G.f.: (1+5*x+25*x^2)/(1-x^3).
a(n) = a(n-3) for n>2.
a(n) = 5^(n mod 3).
a(n) = (31 - 28*cos(2*n*Pi/3) - 20*sqrt(3)*sin(2*n*Pi/3))/3. - Wesley Ivan Hurt, Jun 30 2016
Extensions
Edited by Bruno Berselli, Apr 07 2016
Comments