A180592 Digital root of 2n.
0, 2, 4, 6, 8, 1, 3, 5, 7, 9, 2, 4, 6, 8, 1, 3, 5, 7, 9, 2, 4, 6, 8, 1, 3, 5, 7, 9, 2, 4, 6, 8, 1, 3, 5, 7, 9, 2, 4, 6, 8, 1, 3, 5, 7, 9, 2, 4, 6, 8, 1, 3, 5, 7, 9, 2, 4, 6, 8, 1, 3, 5, 7, 9, 2, 4, 6, 8, 1, 3, 5, 7, 9, 2, 4, 6, 8, 1, 3, 5, 7, 9, 2, 4, 6, 8, 1, 3, 5, 7, 9, 2, 4, 6, 8, 1, 3, 5, 7, 9, 2, 4, 6, 8, 1
Offset: 0
Links
- Index entries for linear recurrences with constant coefficients, signature (0,0,0,0,0,0,0,0,1).
Programs
-
Mathematica
f[n_] := Mod[2 n - 1, 9] + 1; f[0] = 0; Array[f, 105, 0] (* Robert G. Wilson v, Sep 20 2010 *)
-
PARI
a(n)=if(n,(2*n-1)%9+1,0) \\ Charles R Greathouse IV, Aug 25 2014
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)
Extensions
More terms from Robert G. Wilson v, Sep 20 2010
Keyword:base and formulas from R. J. Mathar, Nov 02 2010
Comments