login
This site is supported by donations 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

Table of n, a(n) for n=0..92.

Eric Weisstein's World of Mathematics, Mersenne Number

Index entries for linear recurrences with constant coefficients, signature (1,-1,1).

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

Cf. A000225, A000689, A010688, A010703, A010879, A080172.

Sequence in context: A096627 A065084 A132742 * A210641 A021910 A094124

Adjacent sequences:  A267314 A267315 A267316 * A267318 A267319 A267320

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 | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified February 23 23:56 EST 2018. Contains 299595 sequences. (Running on oeis4.)