login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A070368 a(n) = 5^n mod 13. 3
1, 5, 12, 8, 1, 5, 12, 8, 1, 5, 12, 8, 1, 5, 12, 8, 1, 5, 12, 8, 1, 5, 12, 8, 1, 5, 12, 8, 1, 5, 12, 8, 1, 5, 12, 8, 1, 5, 12, 8, 1, 5, 12, 8, 1, 5, 12, 8, 1, 5, 12, 8, 1, 5, 12, 8, 1, 5, 12, 8, 1, 5, 12, 8, 1, 5, 12, 8, 1, 5, 12, 8, 1, 5, 12, 8, 1, 5, 12, 8, 1, 5, 12, 8, 1, 5, 12, 8, 1, 5, 12, 8, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
COMMENTS
Period 4: repeat [1, 5, 12, 8].
LINKS
FORMULA
From R. J. Mathar, Apr 20 2010: (Start)
a(n) = a(n-1) - a(n-2) + a(n-3) for n>2.
G.f.: ( 1+4*x+8*x^2 ) / ( (1-x)*(1+x^2) ). (End)
a(n) = (26-(11+3*I)*(-I)^n-(11-3*I)*I^n)/4. - Bruno Berselli, Feb 07 2011
From G. C. Greubel, Mar 05 2016: (Start)
a(n) = a(n-4) for n>3.
E.g.f.: (1/2)*(13*cosh(x) + 13*sinh(x) - 11*cos(x) - 3*sin(x)). (End)
MAPLE
seq(op([1, 5, 12, 8]), n=0..50); # Wesley Ivan Hurt, Jul 06 2016
MATHEMATICA
Table[Mod[5^n, 13], {n, 0, 100}] (* G. C. Greubel, Mar 05 2016 *)
PowerMod[5, Range[0, 100], 13] (* or *) PadRight[{}, 100, {1, 5, 12, 8}] (* Harvey P. Dale, Jul 03 2019 *)
PROG
(Sage) [power_mod(5, n, 13) for n in range(0, 93)] # Zerinvary Lajos, Nov 25 2009
(PARI) a(n)=lift(Mod(5, 13)^n) \\ Charles R Greathouse IV, Mar 22 2016
(Magma) [Modexp(5, n, 13): n in [0..100]]; // Vincenzo Librandi, Jun 29 2016
CROSSREFS
Cf. A000351.
Sequence in context: A046610 A009842 A169729 * A066326 A015242 A009415
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, May 12 2002
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)