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

A037666
Decimal expansion of a(n) is given by the first n terms of the periodic sequence with initial period 3,1,0.
0
3, 31, 310, 3103, 31031, 310310, 3103103, 31031031, 310310310, 3103103103, 31031031031, 310310310310, 3103103103103, 31031031031031, 310310310310310, 3103103103103103
OFFSET
1,1
FORMULA
G.f.: x*(3+x) / ( (x-1)*(10*x-1)*(1+x+x^2) ). - R. J. Mathar, Aug 04 2013
MATHEMATICA
Table[FromDigits[PadRight[{}, n, {3, 1, 0}]], {n, 30}] (* or *) LinearRecurrence[ {10, 0, 1, -10}, {3, 31, 310, 3103}, 30] (* Harvey P. Dale, Oct 11 2020 *)
PROG
(PARI) Vec(x*(3+x)/((x-1)*(10*x-1)*(1+x+x^2)) + O(x^25)) \\ Jinyuan Wang, Apr 14 2020
CROSSREFS
Sequence in context: A069589 A222090 A037778 * A065837 A100894 A065533
KEYWORD
nonn,base,easy
STATUS
approved