Also, there's a completely different way to attack the problem of finding
perfect squares using the dyadic form of q: (Prime Exponents). I discovered
this while reading NuVoc about q:

fps1 =: 13 :'y#~0=+/"1]2|_ q:y'


fps1 2+i.100

4 9 16 25 36 49 64 81 100


fps1 8200+i.1000

8281 8464 8649 8836 9025


%: 8281 8464 8649 8836 9025

91 92 93 94 95


fps1

] #~ 0 = [: +/"1 [: ] 2 | _ q: ]


The secret is: if all exponents of the prime factors of an integer are
even, the number is a perfect square.


Skip


Skip Cave
Cave Consulting LLC
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to