login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A070352 a(n) = 3^n mod 5; or period 4, repeat [1, 3, 4, 2]. 4
1, 3, 4, 2, 1, 3, 4, 2, 1, 3, 4, 2, 1, 3, 4, 2, 1, 3, 4, 2, 1, 3, 4, 2, 1, 3, 4, 2, 1, 3, 4, 2, 1, 3, 4, 2, 1, 3, 4, 2, 1, 3, 4, 2, 1, 3, 4, 2, 1, 3, 4, 2, 1, 3, 4, 2, 1, 3, 4, 2, 1, 3, 4, 2, 1, 3, 4, 2, 1, 3, 4, 2, 1, 3, 4, 2, 1, 3, 4, 2, 1, 3, 4, 2, 1, 3, 4, 2, 1, 3, 4, 2, 1, 3, 4, 2, 1, 3, 4, 2, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

COMMENTS

Residues mod 5 of Lucas numbers: for n>=1, a(n-1) = A000032(n) mod 5. - Clark Kimberling, Aug 28 2008

LINKS

G. C. Greubel, Table of n, a(n) for n = 0..1000

Index entries for linear recurrences with constant coefficients, signature (1,-1,1).

FORMULA

a(n) = (1/12)*(8*(n mod 4) + 11*((n+1) mod 4) + 2*((n+2) mod 4) - ((n+3) mod 4)). - Paolo P. Lava, Feb 25 2010

a(n) = (5/2) - (1/4)*(3+i)*i^n - (1/4)*(3-i)*(-i)^n. - Paolo P. Lava, Feb 25 2010

From R. J. Mathar, Apr 13 2010: (Start)

a(n) = a(n-1) - a(n-2) + a(n-3) for n>2.

G.f.: (1+2*x+2*x^2) / ((1-x)*(1+x^2)). (End)

a(n) = 2^(3*n) mod 5. - Gary Detlefs, May 18 2014

E.g.f.: (1/2)*(5*exp(x) + sin(x) - 3*cos(x)). - G. C. Greubel, Mar 11 2016

a(n) = a(n-4) for n>3. - Wesley Ivan Hurt, Jul 09 2016

MAPLE

seq(op([1, 3, 4, 2]), n=0..50); # Wesley Ivan Hurt, Jul 09 2016

MATHEMATICA

Table[PowerMod[3, n, 5], {n, 0, 200}] (* Vladimir Joseph Stephan Orlovsky, Jun 10 2011 *)

PROG

(Sage) [power_mod(2, -n, 5) for n in xrange(0, 101)] # Zerinvary Lajos, Jun 08 2009

(MAGMA) &cat [[1, 3, 4, 2]^^27]; // Bruno Berselli, Dec 10 2015

(MAGMA) [Modexp(3, n, 5): n in [0..100]]; // Bruno Berselli, Mar 23 2016

(PARI) a(n) = lift(Mod(3, 5)^n); \\ Michel Marcus, Mar 16 2016

CROSSREFS

Cf. A000032. - Clark Kimberling, Aug 28 2008

Sequence in context: A238570 A145425 A201909 * A227216 A239678 A136374

Adjacent sequences:  A070349 A070350 A070351 * A070353 A070354 A070355

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 | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified September 26 01:25 EDT 2017. Contains 292500 sequences.