login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo

Thanks to everyone who made a donation during our annual appeal!
To see the list of donors, or make a donation, see the OEIS Foundation home page.

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A070365 a(n) = 5^n mod 7. 5

%I

%S 1,5,4,6,2,3,1,5,4,6,2,3,1,5,4,6,2,3,1,5,4,6,2,3,1,5,4,6,2,3,1,5,4,6,

%T 2,3,1,5,4,6,2,3,1,5,4,6,2,3,1,5,4,6,2,3,1,5,4,6,2,3,1,5,4,6,2,3,1,5,

%U 4,6,2,3,1,5,4,6,2,3,1,5,4,6,2,3,1,5,4,6,2,3,1,5,4,6,2,3,1,5,4,6,2

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

%C From _Klaus Brockhaus_, May 23 2010: (Start)

%C Period 6: repeat [1, 5, 4, 6, 2, 3].

%C Continued fraction expansion of (221+11*sqrt(1086))/490.

%C Decimal expansion of 199/1287.

%C First bisection is A153727. (End)

%H G. C. Greubel, <a href="/A070365/b070365.txt">Table of n, a(n) for n = 0..1000</a>

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

%F a(n) = (1/30)*(17*(n mod 6)+2*((n+1) mod 6)+27*((n+2) mod 6)-3*((n+3) mod 6)+12*((n+4) mod 6)-13*((n+5) mod 6)). - _Paolo P. Lava_, Feb 24 2010

%F From _R. J. Mathar_, Apr 13 2010: (Start)

%F a(n) = a(n-1) - a(n-3) + a(n-4) for n>3.

%F G.f.: (1+4*x-x^2+3*x^3)/ ((1-x)*(1+x)*(x^2-x+1)). (End)

%F From _Klaus Brockhaus_, May 23 2010: (Start)

%F a(n+1)-a(n) = A178141(n).

%F a(n+2)-a(n) = A117373(n+5). (End)

%F From _G. C. Greubel_, Mar 05 2016: (Start)

%F a(n) = a(n-6) for n>5.

%F E.g.f.: (1/3)*(7*cosh(x) + 14*sinh(x) + 2*sqrt(3)*exp(x/2)*sin(sqrt(3)*x/2) - 4*exp(x/2)*cos(sqrt(3)*x/2)). (End)

%F a(n) = (21 - 7*cos(n*Pi) - 8*cos(n*Pi/3) + 4*sqrt(3)*sin(n*Pi/3))/6. - _Wesley Ivan Hurt_, Jun 23 2016

%F a(n) = A010876(A000351(n)). - _Michel Marcus_, Jun 27 2016

%p A070365:=n->[1, 5, 4, 6, 2, 3][(n mod 6)+1]: seq(A070365(n), n=0..100); # _Wesley Ivan Hurt_, Jun 23 2016

%t PowerMod[5, Range[0, 110], 7] (* or *) LinearRecurrence[{1, 0, -1, 1}, {1, 5, 4, 6}, 110] (* _Harvey P. Dale_, Apr 26 2011 *)

%t Table[Mod[5^n, 7], {n, 0, 100}] (* _G. C. Greubel_, Mar 05 2016 *)

%t PadRight[{}, 100, {1, 5, 4, 6, 2, 3}] (* or *) CoefficientList[Series[(1 + 5 x + 4 x^2 + 6 x^3 + 2 x^4 + 3 x^5) / (1 - x^6), {x, 0, 100}], x] (* _Vincenzo Librandi_, Mar 24 2016 *)

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

%o (MAGMA) [Modexp(5, n, 7): n in [0..100]]; // _Vincenzo Librandi_, Mar 24 2016 - after _Bruno Berselli_

%Y Cf. A178229 (decimal expansion of (221+11*sqrt(1086))/490), A178141 (repeat 4, -1, 2, -4, 1, -2), A117373 (repeat 1, -2, -3, -1, 2, 3), A153727 (trajectory of 3x+1 sequence starting at 1).

%Y Cf. A000351, A010876.

%K nonn,easy

%O 0,2

%A _N. J. A. Sloane_, May 12 2002

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified January 21 10:26 EST 2020. Contains 331105 sequences. (Running on oeis4.)