HP Forums
a prime year - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: General Forum (/forum-4.html)
+--- Thread: a prime year (/thread-7502.html)



a prime year - Don Shepherd - 01-01-2017 06:12 PM

Welcome to 2017, a prime year!

When was the last prime year?

When will be the next prime year?


RE: a prime year - Massimo Gnerucci - 01-01-2017 07:05 PM

Also... 9² + 44² = 2017


RE: a prime year - Massimo Gnerucci - 01-01-2017 07:07 PM

(01-01-2017 06:12 PM)Don Shepherd Wrote:  Welcome to 2017, a prime year!

When was the last prime year?

When will be the next prime year?

2011
2027


RE: a prime year - Don Shepherd - 01-01-2017 09:45 PM

(01-01-2017 07:07 PM)Massimo Gnerucci Wrote:  
(01-01-2017 06:12 PM)Don Shepherd Wrote:  Welcome to 2017, a prime year!

When was the last prime year?

When will be the next prime year?

2011
2027

right!!


RE: a prime year - Gilles59 - 01-02-2017 09:23 AM

PREVPRIME LASTARG NEXTPRIME


RE: a prime year - Harald - 01-02-2017 02:17 PM

(01-01-2017 09:45 PM)Don Shepherd Wrote:  
(01-01-2017 07:07 PM)Massimo Gnerucci Wrote:  2011
2027

right!!

I'll vote for a "lastprime" function in the WP34s if you are going to ask more questions like that Smile


RE: a prime year - Paul Dale - 01-02-2017 08:05 PM

(01-02-2017 02:17 PM)Harald Wrote:  I'll vote for a "lastprime" function in the WP34s if you are going to ask more questions like that Smile

The code is in XROM, just not included in any image:

Code:
        XLBL"PREVPRIME"
            INTM?
                JMP prevprime_xin
            DBL?
                JMP prevprime_dbl
            xIN MONADIC

            _INT 50
            _INT 16
            10[^x]
            STO+ Y
            RCL Z
            x>? Z
                ERR ERR_DOMAIN
            MIN
            JMP prevprime_skip_xin

prevprime_dbl::        [infinity]?
                ERR ERR_DOMAIN
prevprime_xin::        xIN MONADIC
prevprime_skip_xin::    CEIL
            PRIME?
                DEC X
            x[<=]1?
                ERR ERR_DOMAIN
            EVEN?
prevprime_loop::        DEC X
            x[<=]1?
                JMP prime_2
            PRIME?
                xOUT xOUT_NORMAL
            DEC X
            JMP prevprime_loop

It would be easy enough to key this in as a user program.


Pauli


RE: a prime year - JMBaillard - 01-02-2017 10:58 PM

Happy New Year to everyone.

A few funny things about 2017:

2017 = 9^2+44^2
= 12^2+28^2+33^2
= 7^3+7^3+11^3
= 6^3+7^3+9^3+9^3
= 2^3+4^3+6^3+9^3+10^3
= 1^3+6^3+6^3+7^3+8^3+9^3 = ....

Best wishes,
JM.


RE: a prime year - Gerald H - 01-03-2017 05:59 AM

Puzzle from The Guardian:

https://www.theguardian.com/science/2017/jan/02/did-you-solve-it-new-year-new-number-new-equation


RE: a prime year - Eddie W. Shore - 01-04-2017 02:00 PM

Happy New Prime Year!


RE: a prime year - Gerald H - 01-07-2017 12:39 PM

While prime, not a perfect year:

https://oeis.org/A061013