%I #28 Sep 08 2022 08:46:01
%S 1,2,4,8,16,32,64,3,6,12,24,48,96,67,9,18,36,72,19,38,76,27,54,108,91,
%T 57,114,103,81,37,74,23,46,92,59,118,111,97,69,13,26,52,104,83,41,82,
%U 39,78,31,62,124,123,121,117,109,93,61,122,119,113,101,77,29
%N a(n) = 2^n mod 125.
%H G. C. Greubel, <a href="/A201920/b201920.txt">Table of n, a(n) for n = 0..10000</a>
%H <a href="/index/Rec#order_51">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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 1).
%F For n > 50: a(n) = a(n-1) - a(n-50) + a(n-51).
%F G.f.: (1 + x + 2x^2 + 4x^3 + 8x^4 + 16x^5 + 32x^6 - 61x^7 + 3x^8 + 6x^9 + 12x^10 + 24x^11 + 48x^12 - 29x^13 - 58x^14 + 9x^15 + 18x^16 + 36x^17 - 53x^18 + 19x^19 + 38x^20 - 49x^21 + 27x^22 + 54x^23 - 17x^24 - 34x^25 + 57x^26 - 11x^27 - 22x^28 - 44x^29 + 37x^30 - 51x^31 + 23x^32 + 46x^33 - 33x^34 + 59x^35 - 7x^36 - 14x^37 - 28x^38 - 56x^39 + 13x^40 + 26x^41 + 52x^42 - 21x^43 - 42x^44 + 41x^45 - 43x^46 + 39x^47 - 47x^48 + 31x^49 + 63x^50) / ((1-x)*(1+x^2)*(1 - x^2 + x^4 - x^6 + x^8 - x^10 + x^12 - x^14 + x^16 - x^18 + x^20 - x^22 + x^24 - x^26 + x^28 - x^30 + x^32 - x^34 + x^36 - x^38 + x^40 - x^42 + x^44 - x^46 + x^48)).
%F Periodic with period 100.
%e a(7) = 2^7 mod 125 = 3.
%t PowerMod[2,Range[0,100],125] (* _Harvey P. Dale_, Aug 12 2013 *)
%o (PARI) a(n)=lift(Mod(2,125)^n) \\ _Charles R Greathouse IV_, Mar 22 2016
%o (Magma) [Modexp(2, n, 125): n in [0..120]]; // _G. C. Greubel_, Oct 17 2018
%o (GAP) a:=List([0..100],n->PowerMod(2,n,125));; Print(a); # _Muniru A Asiru_, Jan 27 2019
%Y Cf. A070402, A070336.
%K nonn,easy
%O 0,2
%A _Franz Vrabec_, Dec 06 2011