Post Reply 
challenge - prime numbers where sum of squared digits of prime number is also prime
01-06-2018, 02:18 AM
Post: #11
RE: challenge - prime numbers where sum of squared digits of prime number is also prime
(01-05-2018 08:37 PM)Gilles59 Wrote:  
Code:
 {} 1
 WHILE DUP 1000 < REPEAT
  NEXTPRIME DUP I->NL SQ LSUM ISPRIME? {SWAP OVER + SWAP} IFT
 END
 DROP

Code:
 100000
 DO 
  PREVPRIME 
 UNTIL DUP I->NL SQ LSUM ISPRIME? END

Warms my heart, Gilles. Smile

I'm starting to think of I→NL as the "challenge and puzzle" command, as it seems to be most useful in those situations.

"If the shoe fits..."
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: challenge - prime numbers where sum of squared digits of prime number is also prime - DavidM - 01-06-2018 02:18 AM



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