login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

a(n) = 7^n mod 45.
1

%I #22 Dec 18 2023 14:05:12

%S 1,7,4,28,16,22,19,43,31,37,34,13,1,7,4,28,16,22,19,43,31,37,34,13,1,

%T 7,4,28,16,22,19,43,31,37,34,13,1,7,4,28,16,22,19,43,31,37,34,13,1,7,

%U 4,28,16,22,19,43,31,37,34,13,1,7,4,28,16,22,19,43,31,37,34,13,1,7,4,28

%N a(n) = 7^n mod 45.

%H G. C. Greubel, <a href="/A070427/b070427.txt">Table of n, a(n) for n = 0..1000</a>

%H <a href="/index/Rec#order_12">Index entries for linear recurrences with constant coefficients</a>, signature (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1).

%F From _R. J. Mathar_, Apr 20 2010: (Start)

%F a(n) = a(n-12).

%F G.f.: ( -1 -7*x -4*x^2 -28*x^3 -16*x^4 -22*x^5 -19*x^6 -43*x^7 -31*x^8 -37*x^9 -34*x^10 -13*x^11 ) / ( (x-1)*(1+x+x^2)*(1+x)*(1-x+x^2)*(1+x^2)*(x^4-x^2+1) ). (End)

%t PowerMod[7,Range[0,80],45] (* or *) PadRight[{},80,{1,7,4,28,16,22,19,43,31,37,34,13}] (* _Harvey P. Dale_, Jan 11 2014 *)

%o (Sage) [power_mod(7,n,45) for n in range(0,76)] # _Zerinvary Lajos_, Nov 27 2009

%o (PARI) a(n)=lift(Mod(7,45)^n) \\ _Charles R Greathouse IV_, Mar 22 2016

%o (Magma) [Modexp(7, n, 45): n in [0..100]]; // _Bruno Berselli_, Mar 22 2016

%K nonn,easy

%O 0,2

%A _N. J. A. Sloane_, May 12 2002