OFFSET
1,1
LINKS
Edward Jiang, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (10,0,1,-10)
FORMULA
G.f. x*(2+2*x+x^2) / ( (x-1)*(10*x-1)*(1+x+x^2) ). - R. J. Mathar, Nov 21 2011
(Start)
a(n) = floor(221/999 * 10^n).
a(n) = 10*a(n-1) + 1 + (n^2 mod 3).
(End) - Robert Israel, Sep 12 2014
MAPLE
seq(floor(221/999*10^n), n=1..30); # Robert Israel, Sep 12 2014
PROG
(PARI) a(n)=my(S=Str); for(i=0, n-1, S=concat(S, [2, 2, 1][i%3+1])); return(eval(S)) \\ Edward Jiang, Sep 11 2014
CROSSREFS
KEYWORD
nonn,base
AUTHOR
STATUS
approved