title: Generating lists in R with patterns related to the entry number
body: <p>Is there a smart way to generate a list like the one below in R using perhaps <code>lapply()</code> or other more extrapolable procedures?</p>
  
  <pre><code>ones   =   c(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1)
  twos   =   c(1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1)
  threes =   c(1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0)
  fours  =   c(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0)
  fives  =   c(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)
  l = list(ones, twos, threes, fours)
  
  [[1]]
   [1] 1 1 1 1 1 1 1 1 1 1 1
  
  [[2]]
   [1] 1 0 1 0 1 0 1 0 1 0 1
  
  [[3]]
   [1] 1 0 0 1 0 0 1 0 0 1 0
  
  [[4]]
   [1] 1 0 0 0 1 0 0 0 1 0 0
  </code></pre>
  
  <p>These correspond to polynomials coefficients in generating functions for partitions.</p>
  
  <p>The first list is for <code>ones</code> and so the counting is in steps of <code>1</code> integer at a time; hence the vector <code>1,1,1,1,1,1,1,...</code> In the entry <code>[[2]]</code> we have the <code>twos</code>, and we are counting by <code>2</code>'s starting at <code>0</code>, skipping the <code>1</code> (coded as <code>0</code>). In <code>[[3]]</code> we are counting by <code>3</code>'s: zero, three, six, nine, etc.</p>