MathGroup Archive 2013

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

Search the Archive

Re: skipping some i, j , ... values in Table

  • To: mathgroup at smc.vnet.net
  • Subject: [mg130834] Re: skipping some i, j , ... values in Table
  • From: Bob Hanlon <hanlonr357 at gmail.com>
  • Date: Sun, 19 May 2013 05:49:51 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-outx@smc.vnet.net
  • Delivered-to: mathgroup-newsendx@smc.vnet.net
  • References: <20130518063946.CEE236A25@smc.vnet.net>

sol = something @@@
   DeleteCases[
    Flatten[
     Table[{i, j}, {i, 10}, {j, 10}],
     1],
    _?(PrimeQ[Total[#]] &)];


or


sol == something @@@
  Select[
   Flatten[
    Table[{i, j}, {i, 10}, {j, 10}],
    1],
   ! PrimeQ[Total[#]] &]


True



Bob Hanlon


On Sat, May 18, 2013 at 2:39 AM, Andre Hautot <ahautot at ulg.ac.be> wrote:

>
> Hi,
> Suppose I need a list, Flatten[Table[something[i,j],{i,10},{j,10}]],
> where some combinations of indices i and j are voluntarily missing under
> a known condition (for example, stupid I know, when i+j is a prime).
> How can I do that ?
> Thanks in advance,
> ahautot
>




  • Prev by Date: Re: skipping some i, j , ... values in Table
  • Next by Date: Re: Work on Basic Mathematica Stephen!
  • Previous by thread: Re: skipping some i, j , ... values in Table
  • Next by thread: Re: skipping some i, j , ... values in Table