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”).

A037778
Decimal expansion of a(n) is given by the first n terms of the periodic sequence with initial period 3,1,0,2.
0
3, 31, 310, 3102, 31023, 310231, 3102310, 31023102, 310231023, 3102310231, 31023102310, 310231023102, 3102310231023, 31023102310231, 310231023102310, 3102310231023102, 31023102310231023, 310231023102310231, 3102310231023102310, 31023102310231023102
OFFSET
1,1
FORMULA
G.f.: x*(3-2*x+2*x^2) / ( (x-1)*(10*x-1)*(x^2+1) ). - R. J. Mathar, Aug 04 2013
MATHEMATICA
nn=20; With[{c=PadRight[{}, nn, {3, 1, 0, 2}]}, Table[FromDigits[Take[c, n]], {n, nn}]] (* Harvey P. Dale, May 26 2012 *)
PROG
(PARI) Vec(x*(3-2*x+2*x^2)/((x-1)*(10*x-1)*(x^2+1)) + O(x^25)) \\ Jinyuan Wang, Apr 14 2020
CROSSREFS
Sequence in context: A222094 A069589 A222090 * A037666 A065837 A100894
KEYWORD
nonn,base,easy
EXTENSIONS
More terms from Harvey P. Dale, May 26 2012
STATUS
approved