3 of 3
added 1415 characters in body
Dennis
  • 210.1k
  • 41
  • 370
  • 823

Python 3, 120 114 bytes

def f(n,k=0):
 while~n:
  k+=1
  try:r=eval(bin(k).translate({48:'],',49:'['})[3:-1])+[];n-=1
  except:0
 print(r)

Test it on Ideone.

How it works

The defined function f takes input n and initializes k to 0. We'll keep incrementing k until n + 1 values of k result in a valid output. Every time we find such a value of k, n is decremented once it reaches -1, ~n yields 0, and the list r that corresponds to the last value of k is printed.

The partial mapping from the positive integers to nested lists (i.e., k ↦ r) has to be bijective, but there are no other constraints. The one used in this answer operates as follows.

  1. Convert k to a binary string representation, staring with 0b.

    For example, 44 ↦ "0b101100".

  2. Replace all 0's (code point 48) in the string representation with the string "]," and all 1's (code point 49) with [.

    For example, "0b101100" ↦ "],b[],[[],],".

  3. Remove the first three characters (they correspond to "0b") and the trailing character (hopefully a comma).

    For example, "],b[],[[],]," ↦ "[],[[],]".

  4. Try evaluating the generated code. If this results in an error, k isn't mapped to any list.

    For example, "[],[[],]" ↦ ([], [[]]).

  5. Concatenate the result (if any) with the empty list. If this results in an error, k isn't mapped to any list.

    For example, ([], [[]]) + [] errors since + cannot concatenate lists and tuples.

Dennis
  • 210.1k
  • 41
  • 370
  • 823