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!)
A267317 a(n) = final digit of 2^n-1. 1
0, 1, 3, 7, 5, 1, 3, 7, 5, 1, 3, 7, 5, 1, 3, 7, 5, 1, 3, 7, 5, 1, 3, 7, 5, 1, 3, 7, 5, 1, 3, 7, 5, 1, 3, 7, 5, 1, 3, 7, 5, 1, 3, 7, 5, 1, 3, 7, 5, 1, 3, 7, 5, 1, 3, 7, 5, 1, 3, 7, 5, 1, 3, 7, 5, 1, 3, 7, 5, 1, 3, 7, 5, 1, 3, 7, 5, 1, 3, 7, 5, 1, 3, 7, 5, 1, 3, 7, 5, 1, 3, 7, 5 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
Decimal expansion of 25/1818.
Period 4: repeat [1, 3, 7, 5] for n > 0.
LINKS
Eric Weisstein's World of Mathematics, Mersenne Number
FORMULA
G.f.: x*(1 + 2*x + 5*x^2)/(1 - x + x^2 - x^3).
a(n) = A010879(A000225(n)).
a(n) = A000689(n) - 1.
a(n) = (1+(-1)^n)*(-1)^(n*(n-1)/2)/2 + 3*(1-(-1)^n)*(-1)^(n*(n+1)/2)/2 + 4 for n > 0, a(0) = 0. [Bruno Berselli, Jan 13 2016]
From Wesley Ivan Hurt, Jun 15 2016: (Start)
a(n) = a(n-4) for n>4.
a(2k+2) = A010703(k), a(2k+1) = A010688(k). (End)
From Wesley Ivan Hurt, Jul 06 2016: (Start)
a(n) = a(n-1) - a(n-2) + a(n-3) for n > 3.
a(n) = 4 + cos(n*Pi/2) - 3*sin(n*Pi/2) for n > 0. (End)
E.g.f.: -5 + cos(x) - 3*sin(x) + 4*exp(x). - Ilya Gutkovskiy, Jul 06 2016
MAPLE
A267317:=n->(2^n-1) mod 10: seq(A267317(n), n=0..150); # Wesley Ivan Hurt, Jun 15 2016
MATHEMATICA
Table[Mod[2^n - 1, 10], {n, 0, 120}]
PROG
(Magma) [0] cat &cat[[1, 3, 7, 5]^^25]; // Bruno Berselli, Jan 13 2016
(PARI) a(n) = if(n==0, 0, if(n%4==0, 5, if(n%4==1, 1, if(n%4==2, 3, if(n%4==3, 7))))) \\ Felix Fröhlich, Jan 19 2016
(PARI) a(n) = lift(Mod(2^n-1, 10)) \\ Felix Fröhlich, Jan 19 2016
CROSSREFS
Sequence in context: A065084 A338769 A132742 * A210641 A021910 A331632
KEYWORD
nonn,base,easy
AUTHOR
Ilya Gutkovskiy, Jan 13 2016
STATUS
approved

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 April 24 10:11 EDT 2024. Contains 371935 sequences. (Running on oeis4.)