OFFSET
0,3
COMMENTS
If the initial 0 is ignored, a(n) is periodic with period 6: [0, 3, 1, 7, 4, 6]. - Wesley Ivan Hurt, Oct 10 2014
LINKS
Index entries for linear recurrences with constant coefficients, signature (1,0,-1,1).
FORMULA
a(n) = a(n-1)-a(n-3)+a(n-4) for n>0, with a(0)=0; a(n) = A068028(n+1)-1 for n>0; a(n+1) = A020806(n)-1. - Wesley Ivan Hurt, Oct 10 2014
G.f.: x^2*(-6*x^2 + 2*x - 3)/(x^4 - x^3 + x - 1). - Chai Wah Wu, Sep 04 2025
EXAMPLE
1/315 = 0.0031746031746031746031746031...
MAPLE
Digits:=100: evalf(1/315); # Wesley Ivan Hurt, Oct 10 2014
MATHEMATICA
RealDigits[1/315, 10, 100, -1][[1]] (* Wesley Ivan Hurt, Oct 10 2014 *)
Join[{0}, LinearRecurrence[{1, 0, -1, 1}, {0, 3, 1, 7}, 98]] (* Ray Chandler, Aug 26 2015 *)
PadRight[{0}, 120, {6, 0, 3, 1, 7, 4}] (* Harvey P. Dale, Mar 28 2026 *)
CROSSREFS
KEYWORD
AUTHOR
STATUS
approved
