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

A037642
Base 7 digits are, in order, the first n terms of the periodic sequence with initial period 2,3,1.
0
2, 17, 120, 842, 5897, 41280, 288962, 2022737, 14159160, 99114122, 693798857, 4856592000, 33996144002, 237973008017, 1665811056120, 11660677392842, 81624741749897, 571373192249280, 3999612345744962
OFFSET
1,1
FORMULA
G.f.: x*(x+2)*(1+x) / ( (x-1)*(7*x-1)*(1+x+x^2) ). - R. J. Mathar, Nov 21 2011
MATHEMATICA
Module[{nn=20, p}, p=PadRight[{}, nn, {2, 3, 1}]; Table[FromDigits[Take[p, n], 7], {n, nn}]] (* or *) LinearRecurrence[{7, 0, 1, -7}, {2, 17, 120, 842}, 20] (* Harvey P. Dale, Jul 17 2013 *)
CROSSREFS
Sequence in context: A037747 A037628 A037754 * A161128 A220403 A097716
KEYWORD
nonn,base
STATUS
approved