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

A033127
Base 9 digits are, in order, the first n terms of the periodic sequence with initial period 1,0,1.
1
1, 9, 82, 739, 6651, 59860, 538741, 4848669, 43638022, 392742199, 3534679791, 31812118120, 286309063081, 2576781567729, 23191034109562, 208719306986059, 1878473762874531, 16906263865870780, 152156374792837021, 1369407373135533189, 12324666358219798702
OFFSET
1,2
FORMULA
a(n) = 9*a(n-1) + a(n-3) - 9*a(n-4).
G.f.: x*(x^2+1) / ((x-1)*(9*x-1)*(x^2+x+1)). - Colin Barker, Apr 30 2014
E.g.f.: exp(-x/2)*(123*exp(19*x/2) - 91*exp(3*x/2) - 32*cos(sqrt(3)*x/2) + 40*sqrt(3)*sin(sqrt(3)*x/2))/1092. - Stefano Spezia, Apr 25 2023
a(n) = floor((41/364)*9^n). - Kevin Ryde, Apr 26 2023
MATHEMATICA
Module[{nn=20, c}, c=PadRight[{}, nn, {1, 0, 1}]; Table[FromDigits[Take[c, n], 9], {n, nn}]] (* or *) LinearRecurrence[{9, 0, 1, -9}, {1, 9, 82, 739}, 20] (* Harvey P. Dale, Jan 03 2014 *)
PROG
(PARI) Vec(x*(x^2+1)/((x-1)*(9*x-1)*(x^2+x+1)) + O(x^100)) \\ Colin Barker, Apr 30 2014
(PARI) a(n) = 41*9^n \ 364; \\ Kevin Ryde, Apr 26 2023
CROSSREFS
Sequence in context: A263817 A288789 A033119 * A361715 A099371 A334611
KEYWORD
nonn,base,easy
STATUS
approved