Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: need to make a special function

  • To: mathgroup at
  • Subject: [mg68300] Re: need to make a special function
  • From: "J Siehler" <jsiehler at>
  • Date: Tue, 1 Aug 2006 06:59:12 -0400 (EDT)
  • References: <eakec7$qvd$>
  • Sender: owner-wri-mathgroup at

>         I need help on making a special type of function which has the
> following properties.
>    f[1]={{0},{1}}
>    f[2]={{0,0},{0,1},{1,0},{1,1}}
>    f[3]={{0,0,0},{0,0,1},{0,1,0},{0,1,1},{1,0,0},{1,0,1},{1,1,0},{1,1,1}}
> on you can see the pattern emerging.
>  I need a very efficient code to perform the above evaluation in some
> optimization problem.

f[n_] := Tuples[{0, 1}, n]

  • Next by Date: Can we prove that it is never a square?
  • Next by thread: Re: need to make a special function