Triangular number AND sum of first m factorials
01-10-2018, 04:03 AM
Post: #7
 Gerson W. Barbosa Senior Member Posts: 1,452 Joined: Dec 2013
RE: Triangular number AND sum of first m factorials
Tn&Sf:

« { } 3 ROT
FOR n n Sfac 8 * 1 + ISPF? { √ 1 - 2 / + n I→R + } { DROP } IFTE
NEXT
»

Sfac:

« DUP 1 - 2
FOR m 1 + m * -1
STEP 1 +
»

ISPF?

« 1
»

7 Tn&Sf ->

{ '(√73-1)/2' 3. '(√265-1)/2' 4. 17 5. '(√6985-1)/2' 6. '(√47305-1)/2' 7. }

49G or 50g in exact mode

ISPF? (IsPerfectSquare?) has yet to be implemented. It should return 1 when the argument is a perfect square and 0 otherwise. Then the output would be a list of n and m pairs, separated by dots. Just in case someone wants to try.
 « Next Oldest | Next Newest »

 Messages In This Thread Triangular number AND sum of first m factorials - Joe Horn - 01-09-2018, 04:31 PM RE: Triangular number AND sum of first m factorials - Gerson W. Barbosa - 01-09-2018, 08:53 PM RE: Triangular number AND sum of first m factorials - Dieter - 01-09-2018, 10:19 PM RE: Triangular number AND sum of first m factorials - Gerson W. Barbosa - 01-09-2018, 11:00 PM RE: Triangular number AND sum of first m factorials - Valentin Albillo - 01-09-2018, 10:16 PM RE: Triangular number AND sum of first m factorials - John Keith - 01-09-2018, 11:10 PM RE: Triangular number AND sum of first m factorials - Gerson W. Barbosa - 01-10-2018 04:03 AM RE: Triangular number AND sum of first m factorials - Joe Horn - 01-10-2018, 04:58 AM RE: Triangular number AND sum of first m factorials - Paul Dale - 01-10-2018, 06:35 AM RE: Triangular number AND sum of first m factorials - Joe Horn - 01-11-2018, 03:01 AM RE: Triangular number AND sum of first m factorials - Paul Dale - 01-11-2018, 10:21 AM RE: Triangular number AND sum of first m factorials - Gerson W. Barbosa - 01-11-2018, 06:29 PM RE: Triangular number AND sum of first m factorials - John Keith - 01-11-2018, 10:43 PM RE: Triangular number AND sum of first m factorials - John Keith - 01-11-2018, 10:30 PM RE: Triangular number AND sum of first m factorials - John Cadick - 01-11-2018, 02:22 PM

User(s) browsing this thread: 1 Guest(s)