login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A201920
a(n) = 2^n mod 125.
2
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, 57, 114, 103, 81, 37, 74, 23, 46, 92, 59, 118, 111, 97, 69, 13, 26, 52, 104, 83, 41, 82, 39, 78, 31, 62, 124, 123, 121, 117, 109, 93, 61, 122, 119, 113, 101, 77, 29
OFFSET
0,2
LINKS
Index entries for linear recurrences with constant coefficients, 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).
FORMULA
For n > 50: a(n) = a(n-1) - a(n-50) + a(n-51).
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)).
Periodic with period 100.
EXAMPLE
a(7) = 2^7 mod 125 = 3.
MATHEMATICA
PowerMod[2, Range[0, 100], 125] (* Harvey P. Dale, Aug 12 2013 *)
PROG
(PARI) a(n)=lift(Mod(2, 125)^n) \\ Charles R Greathouse IV, Mar 22 2016
(Magma) [Modexp(2, n, 125): n in [0..120]]; // G. C. Greubel, Oct 17 2018
(GAP) a:=List([0..100], n->PowerMod(2, n, 125));; Print(a); # Muniru A Asiru, Jan 27 2019
CROSSREFS
Sequence in context: A128901 A025489 A160686 * A343926 A223700 A036140
KEYWORD
nonn,easy
AUTHOR
Franz Vrabec, Dec 06 2011
STATUS
approved