RPL mini-challenge - Triangle of Primes (HP-49G/G+,50g)
06-30-2019, 11:05 PM
Post: #4
 Gerson W. Barbosa Senior Member Posts: 1,605 Joined: Dec 2013
RE: RPL mini-challenge - Triangle of Primes (HP-49G/G+,50g)
(06-30-2019 09:10 PM)Valentin Albillo Wrote:  .
Hi, Gerson:

(06-30-2019 08:41 PM)Gerson W. Barbosa Wrote:  Write an RPL program that lists the elements in the central column of the triangle of primes above, starting from a(0) = 2 up to a(k).

You need to define what k is supposed to be.

Also, as this is (as usual) an RPL mini-challenge I won't enter my HP-71B solution, which is a short one-liner.

Hello, Valentin,

I hope the examples I have provided compensate for some lack of rigor from my part. “k” is the number of elements in the list minus 1.
Yes, it can fit in one HP-71BASIC line if either NEXTPRIME() or PRIME() function is available. Of course, being this an RPL mini-chalenge, the size of your BASIC code won’t compare to equivalent RPL codes. However, considering optimized algorithms can possibly make for shorter RPL codes than we currently have, I think the submission of non-RPL programs might be helpful, so they’re always welcome.

Best regards,

Gerson.
 « Next Oldest | Next Newest »

 Messages In This Thread RPL mini-challenge - Triangle of Primes (HP-49G/G+,50g) - Gerson W. Barbosa - 06-30-2019, 08:41 PM RE: RPL mini-challenge - Triangle of Primes (HP-49G/G+,50g) - Gerson W. Barbosa - 06-30-2019, 08:53 PM RE: RPL mini-challenge - Triangle of Primes (HP-49G/G+,50g) - Valentin Albillo - 06-30-2019, 09:10 PM RE: RPL mini-challenge - Triangle of Primes (HP-49G/G+,50g) - Gerson W. Barbosa - 06-30-2019 11:05 PM RE: RPL mini-challenge - Triangle of Primes (HP-49G/G+,50g) - Thomas Okken - 06-30-2019, 11:57 PM RE: RPL mini-challenge - Triangle of Primes (HP-49G/G+,50g) - Gerson W. Barbosa - 07-01-2019, 12:28 AM RE: RPL mini-challenge - Triangle of Primes (HP-49G/G+,50g) - Gerson W. Barbosa - 07-01-2019, 04:49 AM RE: RPL mini-challenge - Triangle of Primes (HP-49G/G+,50g) - Didier Lachieze - 07-01-2019, 11:13 PM RE: RPL mini-challenge - Triangle of Primes (HP-49G/G+,50g) - Gerson W. Barbosa - 07-02-2019, 12:07 AM RE: RPL mini-challenge - Triangle of Primes (HP-49G/G+,50g) - Paul Dale - 07-01-2019, 12:25 PM RE: RPL mini-challenge - Triangle of Primes (HP-49G/G+,50g) - Didier Lachieze - 07-01-2019, 01:44 PM RE: RPL mini-challenge - Triangle of Primes (HP-49G/G+,50g) - John Keith - 07-01-2019, 12:49 PM RE: RPL mini-challenge - Triangle of Primes (HP-49G/G+,50g) - Claudio L. - 07-01-2019, 01:52 PM RE: RPL mini-challenge - Triangle of Primes (HP-49G/G+,50g) - John Keith - 07-01-2019, 05:05 PM RE: RPL mini-challenge - Triangle of Primes (HP-49G/G+,50g) - Gerson W. Barbosa - 07-01-2019, 05:20 PM RE: RPL mini-challenge - Triangle of Primes (HP-49G/G+,50g) - Claudio L. - 07-01-2019, 09:45 PM RE: RPL mini-challenge - Triangle of Primes (HP-49G/G+,50g) - Paul Dale - 07-02-2019, 12:40 AM RE: RPL mini-challenge - Triangle of Primes (HP-49G/G+,50g) - DavidM - 07-02-2019, 02:21 PM RE: RPL mini-challenge - Triangle of Primes (HP-49G/G+,50g) - DavidM - 07-03-2019, 05:05 AM RE: RPL mini-challenge - Triangle of Primes (HP-49G/G+,50g) - Gerson W. Barbosa - 07-03-2019, 08:00 PM RE: RPL mini-challenge - Triangle of Primes (HP-49G/G+,50g) - Claudio L. - 07-03-2019, 10:33 PM RE: RPL mini-challenge - Triangle of Primes (HP-49G/G+,50g) - Gerson W. Barbosa - 07-04-2019, 03:17 AM RE: RPL mini-challenge - Triangle of Primes (HP-49G/G+,50g) - DavidM - 07-04-2019, 08:21 PM RE: RPL mini-challenge - Triangle of Primes (HP-49G/G+,50g) - Claudio L. - 07-05-2019, 02:45 AM RE: RPL mini-challenge - Triangle of Primes (HP-49G/G+,50g) - Paul Dale - 07-05-2019, 09:47 AM

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