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!)
A036123 a(n) = 3^n mod 31. 3

%I #27 Sep 08 2022 08:44:52

%S 1,3,9,27,19,26,16,17,20,29,25,13,8,24,10,30,28,22,4,12,5,15,14,11,2,

%T 6,18,23,7,21,1,3,9,27,19,26,16,17,20,29,25,13,8,24,10,30,28,22,4,12,

%U 5,15,14,11,2,6,18,23,7,21,1,3

%N a(n) = 3^n mod 31.

%D I. M. Vinogradov, Elements of Number Theory, pp. 220 ff.

%H G. C. Greubel, <a href="/A036123/b036123.txt">Table of n, a(n) for n = 0..10000</a>

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

%F a(n) = a(n+30). - _R. J. Mathar_, Jun 04 2016

%F a(n) = a(n-1) - a(n-15) + a(n-16). - _G. C. Greubel_, Oct 16 2018

%F a(n) = 31 - a(n+15) for all n in Z. - _Michael Somos_, Oct 17 2018

%p [ seq(primroot(ithprime(i))^j mod ithprime(i),j=0..100) ];

%t PowerMod[3, Range[0, 100], 31] (* _G. C. Greubel_, Oct 16 2018 *)

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

%o (Magma) [Modexp(3, n, 31): n in [0..100]]; // _G. C. Greubel_, Oct 18 2018

%o (GAP) List([0..65],n->PowerMod(3,n,31)); # _Muniru A Asiru_, Oct 18 2018

%Y Cf. A000244 (3^n).

%K nonn,easy

%O 0,2

%A _N. J. A. Sloane_

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 3 15:28 EDT 2024. Contains 372216 sequences. (Running on oeis4.)