NB. incorrect version using +/
test=.[: +/ [: (= <.) [: > [: {: [: p. 1 0 _1 ,~ ]
test"0] 3*/\i.20
3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
NB. corrected version version using +./
test=.[: +./ [: (= <.) [: > [: {: [: p. 1 0 _1 ,~ ]
test"0] 3*/\i.20
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
Den 8:46 søndag den 9. august 2015 skrev 'Bo Jacoby' via Programming
<[email protected]>:
Hi Don.
The product of three consecutive numbers is y = (x-1)*x*(x+1)
So x solves the equation (1*x^3)+(0*x^2)+(_1*x^1)+(-y*x^0) = 0
If an x integer solves this equation, then the number y is special.
-- Bo
Den 5:49 søndag den 9. august 2015 skrev Raul Miller
<[email protected]>:
The product of three numbers in sequence can be represented as the
product of three simply polynomials:
+//.@:(*/)/ 0 1,1 1,:2 1
0 2 3 1
That gets us another way of expressing our original expression:
3 */\ i. 20
0 6 24 60 120 210 336 504 720 990 1320 1716 2184 2730 3360 4080 4896 5814
0 2 3 1 p. i. 20
0 6 24 60 120 210 336 504 720 990 1320 1716 2184 2730 3360 4080 4896
5814 6840 7980
Now if we want to solve for x (the lowest of the three numbers in this
representation), we have:
p = 0 + (2*x) + (3*x^2) + x^3
or
0 = (-p)+(2*x) + (3*x^2) + x^3
And now we can look for the roots (and take advantage of a quirk of
their representation).
Good enough?
Thanks,
--
Raul
On Sat, Aug 8, 2015 at 11:39 PM, Don Guinn <[email protected]> wrote:
> Sorry I'm dense. I understand that. But the first polynomial is not
> remotely related to the second other than the gcd of both is x-8. Why?
> On Aug 8, 2015 8:08 PM, "'Pascal Jasmin' via Programming" <
> [email protected]> wrote:
>
>> (x-1)x(x+1) or x(x+1)(x+2) and their expansions are algebraic solutions to
>> special products. All the solutions posted used one of these 2 forms.
>> (your example uses the 2nd's expansion)
>>
>>
>> ----- Original Message -----
>> From: Don Guinn <[email protected]>
>> To: Programming forum <[email protected]>
>> Cc:
>> Sent: Saturday, August 8, 2015 9:53 PM
>> Subject: Re: [Jprogramming] Detecting special products
>>
>> Using polynomials to solve this problem is really neat, but why does it
>> work? I can't find anything on the internet explaining why it works.
>>
>> p._720 2 3 1
>> +-+----------------------------+
>> |1|_5.5j7.72981 _5.5j_7.72981 8|
>> +-+----------------------------+
>> p.1;-8 9 10
>> 720 242 27 1
>>
>> Obviously the polynomial for the roots is quite different from that used
>> above. There has to be a proof somewhere.
>>
>> On Fri, Aug 7, 2015 at 9:47 PM, Don Kelly <[email protected]> wrote:
>>
>> > correction : 'will be the <last> number of the sequence'
>> > in any case for a special number the real root will be an integer.
>> >
>> >
>> > On 06/08/2015 4:06 PM, Don Kelly wrote:
>> >
>> >> also try
>> >> 0=1|( <1; 2) {>p.|.1 3 2,-]720
>> >>
>> >> 1_
>> >>
>> >> 0=1|( <1; 2) {>p.|.1 3 2,-]719
>> >>
>> >> 0
>> >>
>> >> note that
>> >> (<1;2) {>p._y 2 3 1
>> >> will return an integer for a special number and this will be the first
>> >> number of the sequence
>> >> based on x*x+1)*(x+2) -y=0 giving an integral root
>> >> p._720 2 3 1
>> >>
>> >> ┌─┬────────────────────────────┐
>> >>
>> >> │1│_5.5j7.72981 _5.5j_7.72981 8│
>> >>
>> >> └─┴────────────────────────────┘
>> >>
>> >>
>> >> a modification to x(x^2-1) gives an integral real root for the middle
>> root
>> >> p. _720 _1 0 1
>> >>
>> >> ┌─┬────────────────────────────┐
>> >>
>> >> │1│9 _4.5j7.72981 _4.5j_7.72981│
>> >>
>> >> └─┴────────────────────────────┘
>> >>
>> >> puts the real root first rather than last
>> >>
>> >> As for finding a list of these special numbers-the "stope " function
>> >> works well
>> >> f=:3^!.1~[:i.]
>> >>
>> >> f 10
>> >>
>> >> 0 6 24 60 120 210 336 504 720 990
>> >>
>> >>
>> >> Don Kelly
>> >>
>> >>
>> >>
>> >>
>> >>
>> >> On 06/08/2015 1:02 PM, Roger Hui wrote:
>> >>
>> >>> g=: = (^&3 - ])@:(3&(>.@%:))
>> >>> g */"1 (10^40 60 80x)+/0 1 2
>> >>> 1 1 1
>> >>>
>> >>>
>> >>> On Thu, Aug 6, 2015 at 11:23 AM, 'Pascal Jasmin' via Programming <
>> >>> [email protected]> wrote:
>> >>>
>> >>> (] = (^&3 - ])@:(1r3 >.@^~ ])) 990
>> >>>>
>> >>>>
>> >>>>
>> >>>> ----- Original Message -----
>> >>>> From: Kip Murray <[email protected]>
>> >>>> To: "[email protected]" <[email protected]>
>> >>>> Cc:
>> >>>> Sent: Thursday, August 6, 2015 1:58 PM
>> >>>> Subject: [Jprogramming] Detecting special products
>> >>>>
>> >>>> The number 720 is special: it is 8*9*10 the product of three
>> >>>> successive non-negative integers. The first few special numbers are
>> >>>>
>> >>>> */"1 [ 0 1 2 +"1 0 i. 10
>> >>>> 0 6 24 60 120 210 336 504 720 990
>> >>>>
>> >>>> Write a verb test that tests whether a non-negative integer is
>> >>>> special:
>> >>>>
>> >>>> test 720
>> >>>> 1
>> >>>> test 0
>> >>>> 1
>> >>>> test 721
>> >>>> 0
>> >>>>
>> >>>> --Kip Murray
>> >>>>
>> >>>>
>> >>>>
>> >>>> --
>> >>>> Sent from Gmail Mobile
>> >>>> ----------------------------------------------------------------------
>> >>>> For information about J forums see
>> http://www.jsoftware.com/forums.htm
>>
>> >>>> ----------------------------------------------------------------------
>> >>>> For information about J forums see
>> http://www.jsoftware.com/forums.htm
>> >>>>
>> >>>> ----------------------------------------------------------------------
>> >>> For information about J forums see http://www.jsoftware.com/forums.htm
>> >>>
>> >>>
>> >> ----------------------------------------------------------------------
>> >> For information about J forums see http://www.jsoftware.com/forums.htm
>> >>
>> >
>> > ----------------------------------------------------------------------
>> > For information about J forums see http://www.jsoftware.com/forums.htm
>> >
>> ----------------------------------------------------------------------
>> For information about J forums see http://www.jsoftware.com/forums.htm
>> ----------------------------------------------------------------------
>> For information about J forums see http://www.jsoftware.com/forums.htm
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm