login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A070354 a(n) = 3^n mod 16. 1
1, 3, 9, 11, 1, 3, 9, 11, 1, 3, 9, 11, 1, 3, 9, 11, 1, 3, 9, 11, 1, 3, 9, 11, 1, 3, 9, 11, 1, 3, 9, 11, 1, 3, 9, 11, 1, 3, 9, 11, 1, 3, 9, 11, 1, 3, 9, 11, 1, 3, 9, 11, 1, 3, 9, 11, 1, 3, 9, 11, 1, 3, 9, 11, 1, 3, 9, 11, 1, 3, 9, 11, 1, 3, 9, 11, 1, 3, 9, 11, 1, 3, 9, 11, 1, 3, 9, 11, 1, 3, 9, 11, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

LINKS

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

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

FORMULA

From Paolo P. Lava, Feb 25 2010: (Start)

a(n) = (1/2)*(7*(n mod 4)+((n+1) mod 4)-((n+2) mod 4)+((n+3) mod 4)).

a(n) = 6-(2-2*i)*i^n-(-1)^n-(2+2*i)*(-i)^n, with i=sqrt(-1). (End)

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

a(n) = a(n-4).

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

E.g.f.: 5*cosh(x) + 7*sinh(x) - 4*cos(x) - 4*sin(x). - G. C. Greubel, Mar 11 2016

MATHEMATICA

PowerMod[3, Range[0, 50], 16] (* or *) Table[Mod[3^n, 16], {n, 0, 100}] (* G. C. Greubel, Mar 11 2016 *)

PROG

(Sage) [power_mod(3, n, 16) for n in range(0, 93)] # Zerinvary Lajos, Nov 25 2009

(PARI) a(n)=lift(Mod(3, 16)^n) \\ Charles R Greathouse IV, Mar 22 2016

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

CROSSREFS

Sequence in context: A228450 A121057 A025538 * A174565 A074261 A059868

Adjacent sequences:  A070351 A070352 A070353 * A070355 A070356 A070357

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 4 11:32 EDT 2020. Contains 334825 sequences. (Running on oeis4.)