

A070420


a(n) = 7^n mod 37.


2



1, 7, 12, 10, 33, 9, 26, 34, 16, 1, 7, 12, 10, 33, 9, 26, 34, 16, 1, 7, 12, 10, 33, 9, 26, 34, 16, 1, 7, 12, 10, 33, 9, 26, 34, 16, 1, 7, 12, 10, 33, 9, 26, 34, 16, 1, 7, 12, 10, 33, 9, 26, 34, 16, 1, 7, 12, 10, 33, 9, 26, 34, 16, 1, 7, 12, 10, 33, 9, 26, 34, 16, 1, 7, 12, 10, 33, 9
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,2


COMMENTS

Sequence is periodic with length 9. Since a(18) = 1, 37 is composite in Z[sqrt(7)]: it can be factored as (10  3*sqrt(7))(10 + 3*sqrt(7)).  Alonso del Arte, Oct 12 2012


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,0,0,0,0,0,1).


FORMULA

From R. J. Mathar, Apr 20 2010: (Start)
a(n) = a(n  9).
G.f.: ( 1  7*x  12*x^2  10*x^3  33*x^4  9*x^5  26*x^6  34*x^7  16*x^8 ) / ( (x  1)*(1 + x + x^2)*(x^6 + x^3 + 1) ). (End)


EXAMPLE

a(2) = 12 because 7^2 = 49 and 49  37 = 12.


MATHEMATICA

PowerMod[7, Range[0, 74], 37] (* Alonso del Arte, Oct 12 2012 *)


PROG

(Sage) [power_mod(7, n, 37) for n in range(0, 78)] # Zerinvary Lajos, Nov 27 2009
(PARI) a(n) = lift(Mod(7, 37)^n); \\ Michel Marcus, Mar 21 2016
(MAGMA) [Modexp(7, n, 37): n in [0..100]]; // Bruno Berselli, Mar 22 2016


CROSSREFS

Sequence in context: A038598 A180570 A074474 * A223423 A274334 A328414
Adjacent sequences: A070417 A070418 A070419 * A070421 A070422 A070423


KEYWORD

nonn,easy


AUTHOR

N. J. A. Sloane, May 12 2002


STATUS

approved



