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.

Original entry on oeis.org

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, 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, 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
Offset: 0

Views

Author

N. J. A. Sloane, May 12 2002

Keywords

Comments

From Klaus Brockhaus, May 23 2010: (Start)
Period 6: repeat [1, 5, 4, 6, 2, 3].
Continued fraction expansion of (221+11*sqrt(1086))/490.
Decimal expansion of 199/1287.
First bisection is A153727. (End)

Crossrefs

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).

Programs

  • Magma
    [Modexp(5, n, 7): n in [0..100]]; // Vincenzo Librandi, Mar 24 2016 - after Bruno Berselli
  • Maple
    A070365:=n->[1, 5, 4, 6, 2, 3][(n mod 6)+1]: seq(A070365(n), n=0..100); # Wesley Ivan Hurt, Jun 23 2016
  • Mathematica
    PowerMod[5, Range[0, 110], 7] (* or *) LinearRecurrence[{1, 0, -1, 1}, {1, 5, 4, 6}, 110] (* Harvey P. Dale, Apr 26 2011 *)
    Table[Mod[5^n, 7], {n, 0, 100}] (* G. C. Greubel, Mar 05 2016 *)
    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 *)
  • PARI
    a(n)=lift(Mod(5,7)^n) \\ Charles R Greathouse IV, Mar 22 2016
    

Formula

From R. J. Mathar, Apr 13 2010: (Start)
a(n) = a(n-1) - a(n-3) + a(n-4) for n>3.
G.f.: (1+4*x-x^2+3*x^3)/ ((1-x)*(1+x)*(x^2-x+1)). (End)
From Klaus Brockhaus, May 23 2010: (Start)
a(n+1)-a(n) = A178141(n).
a(n+2)-a(n) = A117373(n+5). (End)
From G. C. Greubel, Mar 05 2016: (Start)
a(n) = a(n-6) for n>5.
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)
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
a(n) = A010876(A000351(n)). - Michel Marcus, Jun 27 2016