<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0">
  <channel>
    <title>MaplePrimes - answers and comments on Question, For and If loop</title>
    <link>http://www.mapleprimes.com/questions/140662-For-And-If-Loop</link>
    <language>en-us</language>
    <copyright>2026 Maplesoft, A Division of Waterloo Maple Inc.</copyright>
    <generator>Maplesoft Document System</generator>
    <lastBuildDate>Sun, 14 Jun 2026 02:40:09 GMT</lastBuildDate>
    <pubDate>Sun, 14 Jun 2026 02:40:09 GMT</pubDate>
    <itunes:subtitle />
    <itunes:summary />
    <description>The latest answers and comments added to the Question, For and If loop</description>
    <image>
      <url>http://www.mapleprimes.com/images/mapleprimeswhite.jpg</url>
      <title>MaplePrimes - answers and comments on Question, For and If loop</title>
      <link>http://www.mapleprimes.com/questions/140662-For-And-If-Loop</link>
    </image>
    <item>
      <title>Could you be more precise?</title>
      <link>http://www.mapleprimes.com/questions/140662-For-And-If-Loop?ref=Feed:MaplePrimes:For and If loop:Comments#answer140666</link>
      <itunes:summary>&lt;p&gt;Could you state in more precise mathematical (set theoretic) language what you want?&amp;nbsp; Do you want one of these:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;all &lt;em&gt;k&lt;/em&gt; in {$1..10} such that there exists a pair (&lt;em&gt;a&lt;/em&gt;,&lt;em&gt;b&lt;/em&gt;) in&lt;em&gt; A&lt;/em&gt;^2 such that the relation holds,&lt;/li&gt;
&lt;li&gt;all pairs (&lt;em&gt;a&lt;/em&gt;,&lt;em&gt;b&lt;/em&gt;) in &lt;em&gt;A&lt;/em&gt;^2 such that there exists &lt;em&gt;k&lt;/em&gt; in {$1..10} such that the relation holds,&lt;/li&gt;
&lt;li&gt;all triples (&lt;em&gt;a&lt;/em&gt;,&lt;em&gt;b&lt;/em&gt;,&lt;em&gt;k&lt;/em&gt;) in&lt;em&gt; A&lt;/em&gt;^2&lt;strong&gt; x&lt;/strong&gt; {$1..10} such that the relation holds?&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Also, as Doug pointed out, is the relation&lt;em&gt; a&lt;/em&gt;^&lt;em&gt;k&lt;/em&gt; =&lt;em&gt; b&lt;/em&gt; or &lt;em&gt;a&lt;/em&gt;^&lt;em&gt;k&lt;/em&gt; = &lt;em&gt;b&lt;/em&gt;^2? If the latter, then we can immediately eliminate all odd &lt;em&gt;k&lt;/em&gt;.&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;Could you state in more precise mathematical (set theoretic) language what you want?&amp;nbsp; Do you want one of these:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;all &lt;em&gt;k&lt;/em&gt; in {$1..10} such that there exists a pair (&lt;em&gt;a&lt;/em&gt;,&lt;em&gt;b&lt;/em&gt;) in&lt;em&gt; A&lt;/em&gt;^2 such that the relation holds,&lt;/li&gt;
&lt;li&gt;all pairs (&lt;em&gt;a&lt;/em&gt;,&lt;em&gt;b&lt;/em&gt;) in &lt;em&gt;A&lt;/em&gt;^2 such that there exists &lt;em&gt;k&lt;/em&gt; in {$1..10} such that the relation holds,&lt;/li&gt;
&lt;li&gt;all triples (&lt;em&gt;a&lt;/em&gt;,&lt;em&gt;b&lt;/em&gt;,&lt;em&gt;k&lt;/em&gt;) in&lt;em&gt; A&lt;/em&gt;^2&lt;strong&gt; x&lt;/strong&gt; {$1..10} such that the relation holds?&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Also, as Doug pointed out, is the relation&lt;em&gt; a&lt;/em&gt;^&lt;em&gt;k&lt;/em&gt; =&lt;em&gt; b&lt;/em&gt; or &lt;em&gt;a&lt;/em&gt;^&lt;em&gt;k&lt;/em&gt; = &lt;em&gt;b&lt;/em&gt;^2? If the latter, then we can immediately eliminate all odd &lt;em&gt;k&lt;/em&gt;.&lt;/p&gt;</description>
      <guid>140666</guid>
      <pubDate>Wed, 21 Nov 2012 23:02:55 Z</pubDate>
      <itunes:author>Carl Love</itunes:author>
      <author>Carl Love</author>
    </item>
    <item>
      <title>Given a set A:={...}and an equation eq1:=a^k=b^2;eq2:=solve</title>
      <link>http://www.mapleprimes.com/questions/140662-For-And-If-Loop?ref=Feed:MaplePrimes:For and If loop:Comments#answer140673</link>
      <itunes:summary>&lt;pre&gt;Given a set A:={...}&lt;br&gt;and an equation &lt;br&gt;eq1:=a^k=b^2;&lt;br&gt;eq2:=solve(%,k);&lt;br&gt;&lt;br&gt;This might be what you want 8D For any set of a and b, k can only have one value&lt;/pre&gt;
&lt;pre&gt;for i from 1 to nops(A) do&lt;br&gt;   for j from 1 to nops(A) do&lt;br&gt;      evalf(subs([a=A[i],b=A[j]],eq2));&lt;br&gt;      if evalb(%-round(%)=0) then&lt;br&gt;         print(k=%,[(a=A[i],b=A[j])]);&lt;br&gt;      end if;&lt;br&gt;   end do;&lt;br&gt;end do;&lt;/pre&gt;</itunes:summary>
      <description>&lt;pre&gt;Given a set A:={...}&lt;br&gt;and an equation &lt;br&gt;eq1:=a^k=b^2;&lt;br&gt;eq2:=solve(%,k);&lt;br&gt;&lt;br&gt;This might be what you want 8D For any set of a and b, k can only have one value&lt;/pre&gt;
&lt;pre&gt;for i from 1 to nops(A) do&lt;br&gt;   for j from 1 to nops(A) do&lt;br&gt;      evalf(subs([a=A[i],b=A[j]],eq2));&lt;br&gt;      if evalb(%-round(%)=0) then&lt;br&gt;         print(k=%,[(a=A[i],b=A[j])]);&lt;br&gt;      end if;&lt;br&gt;   end do;&lt;br&gt;end do;&lt;/pre&gt;</description>
      <guid>140673</guid>
      <pubDate>Thu, 22 Nov 2012 02:37:21 Z</pubDate>
      <itunes:author>SanctumZero</itunes:author>
      <author>SanctumZero</author>
    </item>
  </channel>
</rss>