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!)
A070409 a(n) = 7^n mod 23. 1

%I #37 Sep 08 2022 08:45:05

%S 1,7,3,21,9,17,4,5,12,15,13,22,16,20,2,14,6,19,18,11,8,10,1,7,3,21,9,

%T 17,4,5,12,15,13,22,16,20,2,14,6,19,18,11,8,10,1,7,3,21,9,17,4,5,12,

%U 15,13,22,16,20,2,14,6,19,18,11,8,10,1,7,3,21,9,17,4,5,12,15,13,22,16,20

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

%C Periodic with period 22. - _Joerg Arndt_, Feb 24 2015

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

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

%F a(n) = a(n-1) - a(n-11) + a(n-12).

%F G.f.: ( -1 - 6*x + 4*x^2 - 18*x^3 + 12*x^4 - 8*x^5 + 13*x^6 - x^7 - 7*x^8 - 3*x^9 + 2*x^10 - 10*x^11 ) / ( (x-1)*(1+x)*(x^10 - x^9 + x^8 - x^7 + x^6 - x^5 + x^4 - x^3 + x^2 - x + 1) ). (End)

%F a(n) = A000420(n) mod 23. - _Michel Marcus_, Feb 24 2015

%t Table[PowerMod[7, n, 23], {n, 0, 79}] (* _Alonso del Arte_, Feb 23 2015 *)

%t CoefficientList[Series[(- 1 - 6 x + 4 x^2 - 18 x^3 + 12 x^4 - 8 x^5 + 13 x^6 - x^7 - 7 x^8 - 3 x^9 + 2 x^10 - 10 x^11) / ((x - 1) (1 + x) (x^10 - x^9 + x^8 - x^7 + x^6 - x^5 + x^4 - x^3 + x^2 - x + 1)), {x, 0, 80}], x] (* _Vincenzo Librandi_, Feb 26 2015 *)

%t LinearRecurrence[{1, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 1},{1, 7, 3, 21, 9, 17, 4, 5, 12, 15, 13, 22},80] (* _Ray Chandler_, Aug 27 2015 *)

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

%o (PARI) a(n) = lift(Mod(7, 23)^n); \\ _Michel Marcus_, Feb 23 2015

%o (Magma) I:=[1,7,3,21,9,17,4,5,12,15,13,22]; [n le 12 select I[n] else Self(n-1)-Self(n-11)+Self(n-12): n in [1..70]]; // _Vincenzo Librandi_, Feb 26 2015

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

%K nonn,easy

%O 0,2

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

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 May 1 23:54 EDT 2024. Contains 372178 sequences. (Running on oeis4.)