cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A070365 a(n) = 5^n mod 7.

This page as a plain text file.
%I A070365 #45 Dec 14 2023 05:12:44
%S A070365 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 A070365 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 A070365 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 A070365 a(n) = 5^n mod 7.
%C A070365 From _Klaus Brockhaus_, May 23 2010: (Start)
%C A070365 Period 6: repeat [1, 5, 4, 6, 2, 3].
%C A070365 Continued fraction expansion of (221+11*sqrt(1086))/490.
%C A070365 Decimal expansion of 199/1287.
%C A070365 First bisection is A153727. (End)
%H A070365 G. C. Greubel, <a href="/A070365/b070365.txt">Table of n, a(n) for n = 0..1000</a>
%H A070365 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,-1,1).
%F A070365 From _R. J. Mathar_, Apr 13 2010: (Start)
%F A070365 a(n) = a(n-1) - a(n-3) + a(n-4) for n>3.
%F A070365 G.f.: (1+4*x-x^2+3*x^3)/ ((1-x)*(1+x)*(x^2-x+1)). (End)
%F A070365 From _Klaus Brockhaus_, May 23 2010: (Start)
%F A070365 a(n+1)-a(n) = A178141(n).
%F A070365 a(n+2)-a(n) = A117373(n+5). (End)
%F A070365 From _G. C. Greubel_, Mar 05 2016: (Start)
%F A070365 a(n) = a(n-6) for n>5.
%F A070365 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 A070365 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 A070365 a(n) = A010876(A000351(n)). - _Michel Marcus_, Jun 27 2016
%p A070365 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 A070365 PowerMod[5, Range[0, 110], 7] (* or *) LinearRecurrence[{1, 0, -1, 1}, {1, 5, 4, 6}, 110] (* _Harvey P. Dale_, Apr 26 2011 *)
%t A070365 Table[Mod[5^n, 7], {n, 0, 100}] (* _G. C. Greubel_, Mar 05 2016 *)
%t A070365 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 A070365 (PARI) a(n)=lift(Mod(5,7)^n) \\ _Charles R Greathouse IV_, Mar 22 2016
%o A070365 (Magma) [Modexp(5, n, 7): n in [0..100]]; // _Vincenzo Librandi_, Mar 24 2016 - after _Bruno Berselli_
%Y A070365 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 A070365 Cf. A000351, A010876.
%K A070365 nonn,easy
%O A070365 0,2
%A A070365 _N. J. A. Sloane_, May 12 2002