login
a(n) = 7^n mod 71.
2

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

%S 1,7,49,59,58,51,2,14,27,47,45,31,4,28,54,23,19,62,8,56,37,46,38,53,

%T 16,41,3,21,5,35,32,11,6,42,10,70,64,22,12,13,20,69,57,44,24,26,40,67,

%U 43,17,48,52,9,63,15,34,25,33

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

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

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

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

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

%F a(n) = a(n-1) - a(n-35) + a(n-36). - _G. C. Greubel_, Oct 17 2018

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

%t PowerMod[7, Range[0, 100], 71] (* _G. C. Greubel_, Oct 17 2018 *)

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

%o (Magma) [Modexp(7, n, 71): n in [0..100]]; // _G. C. Greubel_, Oct 17 2018

%o (Python) for n in range(0, 100): print(int(pow(7, n, 71)), end=' ') # _Stefano Spezia_, Oct 17 2018

%o (GAP) List([0..60],n->PowerMod(7,n,71)); # _Muniru A Asiru_, Oct 17 2018

%Y Cf. A000420 (7^n).

%K nonn,easy

%O 0,2

%A _N. J. A. Sloane_