OFFSET
0,3
LINKS
Index entries for linear recurrences with constant coefficients, signature (0,0,0,0,0,0,1).
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
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 *)
PROG
(Magma) [Modorder(n, 7): n in [0..110]]; // Bruno Berselli, Mar 22 2016
(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
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
More terms from Larry Reeves (larryr(AT)acm.org), Apr 04 2000
STATUS
approved