New in Wolfram Mathematica 7: Integer Sequence Analysis  previous | next 
Generate Periodic Sequences
Make periodic extensions to finite sequences using LinearRecurrence.
In[1]:=

Click for copyable input
LinearRecurrence[{0, 0, 1}, {a, b, c}, 9]
Out[1]=



In[2]:=

Click for copyable input
PeriodicTexture[l_, {m_, n_}] := 

 ArrayPlot[

  Partition[

   LinearRecurrence[Append[Table[0, {Length[l] - 1}], 1], l, m n], n],

   ColorRules -> 

   Table[Sort[l][[i]] -> Hue[i/(Length[l] + 1)], {i, Length[l]}]]
In[3]:=

Click for copyable input
GraphicsGrid[{{PeriodicTexture[

    Table[LiouvilleLambda[k], {k, 282}], {200, 200}], 

   PeriodicTexture[

    Table[LiouvilleLambda[k], {k, 88}], {200, 

     200}]}, {PeriodicTexture[

    Table[PrimeNu[k], {k, 260}], {200, 200}], 

   PeriodicTexture[Table[PrimeOmega[k], {k, 255}], {200, 200}]}}]
Out[3]=