login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A322925
Expansion of x*(1 + 2*x + 10*x^2)/((1 - x^2)*(1 - 10*x^2)).
1
0, 1, 2, 21, 22, 221, 222, 2221, 2222, 22221, 22222, 222221, 222222, 2222221, 2222222, 22222221, 22222222, 222222221, 222222222, 2222222221, 2222222222, 22222222221, 22222222222, 222222222221, 222222222222, 2222222222221, 2222222222222, 22222222222221
OFFSET
0,3
FORMULA
G.f.: x*(1 + 2*x + 10*x^2)/((1 - x^2)*(1 - 10*x^2)).
a(n) = 11*a(n-2) - 10* a(n-4).
a(n) = 2*(10^n - 1)/9 for n even; a(n) = (2*10^n - 11)/9 otherwise.
a(n) = (2/9)*10^floor((n + 1)/2) + (-1)^n/2 - 13/18. - Bruno Berselli, Mar 16 2019
MAPLE
seq(coeff(series(x*(1+2*x+10*x^2)/((1-x^2)*(1-10*x^2)), x, n+1), x, n), n = 0 .. 30); # Muniru A Asiru, Apr 10 2019
MATHEMATICA
CoefficientList[Series[x (1 + 2 x + 10 x^2)/((1 - x^2) (1 - 10 x^2)), {x, 0, 33}], x]
LinearRecurrence[{0, 11, 0, -10}, {0, 1, 2, 21}, 30] (* Harvey P. Dale, Mar 02 2021 *)
PROG
(Magma) I:=[0, 1, 2, 21]; [n le 4 select I[n] else 11*Self(n-2)-10*Self(n-4): n in [1..30]]
(GAP) a:=[0, 1, 2, 21];; for n in [5..30] do a[n]:=11*a[n-2]-10*a[n-4]; od; Print(a); # Muniru A Asiru, Apr 10 2019
CROSSREFS
Bisections give: A002276 (even part), A165402 (odd part).
Sequence in context: A359385 A110301 A233135 * A294116 A041513 A135053
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Mar 16 2019
STATUS
approved