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.

A038138 Order of n (mod 7).

Original entry on oeis.org

0, 1, 3, 6, 3, 6, 2, 0, 1, 3, 6, 3, 6, 2, 0, 1, 3, 6, 3, 6, 2, 0, 1, 3, 6, 3, 6, 2, 0, 1, 3, 6, 3, 6, 2, 0, 1, 3, 6, 3, 6, 2, 0, 1, 3, 6, 3, 6, 2, 0, 1, 3, 6, 3, 6, 2, 0, 1, 3, 6, 3, 6, 2, 0, 1, 3, 6, 3, 6, 2, 0, 1, 3, 6, 3, 6, 2, 0, 1, 3, 6, 3, 6, 2, 0, 1, 3, 6, 3, 6, 2, 0, 1, 3, 6, 3, 6, 2, 0, 1, 3, 6, 3, 6, 2, 0
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    [Modorder(n,7): n in [0..110]]; // Bruno Berselli, Mar 22 2016
    
  • Mathematica
    ReplacePart[Table[MultiplicativeOrder[n, 7], {n, 105}], List /@ Range[7, 105, 7] -> 0] (* Alonso del Arte, Mar 23 2016 *)
    PadRight[{},120,{0,1,3,6,3,6,2}] (* Harvey P. Dale, Apr 26 2020 *)
  • PARI
    a(n) = if (n % 7, znorder(Mod(n, 7)), 0); \\ Michel Marcus, Mar 22 2016
    
  • PARI
    x='x+O('x^200); concat(0, Vec(x*(1+3*x+6*x^2+3*x^3+6*x^4+2*x^5)/(1-x^7))) \\ Altug Alkan, Mar 23 2016

Formula

G.f.: x*(1 + 3*x + 6*x^2 + 3*x^3 + 6*x^4 + 2*x^5)/(1 - x^7). - Bruno Berselli, Mar 22 2016
a(n) = -(35*(n mod 7)^6 - 603*(n mod 7)^5 + 3860*(n mod 7)^4 - 11235*(n mod 7)^3 + 14465*(n mod 7)^2 - 6882*(n mod 7))/360. - Luce ETIENNE, Oct 20 2017

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Apr 04 2000