Triangular number AND sum of first m factorials

01102018, 04:03 AM
Post: #7




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 > { '(√731)/2' 3. '(√2651)/2' 4. 17 5. '(√69851)/2' 6. '(√473051)/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 »

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