OFFSET
0,2
COMMENTS
Period 9. - Robert G. Wilson v, Sep 20 2010
Also digital root of A002276(n). - Enrique Pérez Herrero, Nov 05 2022
LINKS
Index entries for linear recurrences with constant coefficients, signature (0,0,0,0,0,0,0,0,1).
FORMULA
From R. J. Mathar, Nov 02 2010: (Start)
a(n) = A010888(2*n).
a(n) = a(n-9), n > 9.
G.f.: -x*(2 + 4*x + 6*x^2 + 8*x^3 + x^4 + 3*x^5 + 5*x^6 + 7*x^7 + 9*x^8) / ( (x-1)*(1 + x + x^2)*(x^6 + x^3 + 1) ). (End)
MATHEMATICA
f[n_] := Mod[2 n - 1, 9] + 1; f[0] = 0; Array[f, 105, 0] (* Robert G. Wilson v, Sep 20 2010 *)
PROG
(PARI) a(n)=if(n, (2*n-1)%9+1, 0) \\ Charles R Greathouse IV, Aug 25 2014
CROSSREFS
KEYWORD
easy,nonn,base
AUTHOR
Odimar Fabeny, Sep 10 2010
EXTENSIONS
More terms from Robert G. Wilson v, Sep 20 2010
Keyword:base and formulas from R. J. Mathar, Nov 02 2010
STATUS
approved