login
A037613
Base 6 digits are, in order, the first n terms of the periodic sequence with initial period 1,3,2.
0
1, 9, 56, 337, 2025, 12152, 72913, 437481, 2624888, 15749329, 94495977, 566975864, 3401855185, 20411131113, 122466786680, 734800720081, 4408804320489, 26452825922936, 158716955537617, 952301733225705, 5713810399354232
OFFSET
1,2
FORMULA
G.f.: x*(1+x)*(2*x+1) / ( (x-1)*(6*x-1)*(1+x+x^2) ). - R. J. Mathar, Apr 27 2015
MATHEMATICA
Table[FromDigits[PadRight[{}, n, {1, 3, 2}], 6], {n, 30}] (* or *) LinearRecurrence[ {6, 0, 1, -6}, {1, 9, 56, 337}, 30] (* Harvey P. Dale, Nov 05 2016 *)
PROG
(PARI) a(n)=([0, 1, 0, 0; 0, 0, 1, 0; 0, 0, 0, 1; -6, 1, 0, 6]^(n-1)*[1; 9; 56; 337])[1, 1] \\ Charles R Greathouse IV, Feb 13 2017
CROSSREFS
Sequence in context: A296817 A034362 A037711 * A274553 A221801 A131468
KEYWORD
nonn,base,easy
STATUS
approved