HP 38G: Better than Prime for some Sequences using the built in Sequence App
|
03-06-2015, 07:46 AM
(This post was last modified: 03-07-2015 12:28 PM by Gerald H.)
Post: #1
|
|||
|
|||
HP 38G: Better than Prime for some Sequences using the built in Sequence App
Edited 2015-03-07: Removed question mark from title of thread
I post here a challenge: For http://oeis.org/search?q=a004001&languag...&go=Search This works on the 38G: U1(1)=1 U1(2)=1 U1(N)=U1(U1(N-1))+U1(N-U1(N-1)). On the Prime & 39gii it refuses to get ticked & is consequently unevaluable. Should I however be in error I would be very pleased to see a demonstration of how to realize the series on either Prime or 39gii. I offer a prize of an HP 38G to the first successful solution posted here in this forum. |
|||
03-06-2015, 07:49 AM
Post: #2
|
|||
|
|||
RE: HP 38G: Better than Prime for Sequences?
(03-06-2015 07:46 AM)Gerald H Wrote: I offer a prize of an HP 38G to the first successful solution posted here in this forum. If that is the prize I doubt you'll find many takers... ;) SCNR Greetings, Massimo -+×÷ ↔ left is right and right is wrong |
|||
03-06-2015, 07:55 AM
Post: #3
|
|||
|
|||
RE: HP 38G: Better than Prime for Sequences?
(03-06-2015 07:49 AM)Massimo Gnerucci Wrote:(03-06-2015 07:46 AM)Gerald H Wrote: I offer a prize of an HP 38G to the first successful solution posted here in this forum. Oh, I don't know - If the poor old useless calculator can solve something the Prime can't? |
|||
03-07-2015, 01:41 AM
Post: #4
|
|||
|
|||
RE: HP 38G: Better than Prime for Sequences?
(03-06-2015 07:46 AM)Gerald H Wrote: This works on the 38G: Fascinating. The 40gs handles it fine too. I wonder why the 39gii and Prime balk at it. <0|ɸ|0> -Joe- |
|||
03-07-2015, 05:29 AM
(This post was last modified: 03-07-2015 05:31 AM by BruceH.)
Post: #5
|
|||
|
|||
RE: HP 38G: Better than Prime for Sequences?
(03-07-2015 01:41 AM)Joe Horn Wrote: Fascinating. The 40gs handles it fine too. I wonder why the 39gii and Prime balk at it.It's to do with the use of U1 as the index to U1. I tried setting U2 to be U1(N-1) and making the appropriate substitution and that still fails. Creating a user defined function TT(N)=U1(N-1) and substituting also fails. So I think the Sequence app is scanning the parse tree in an effort to avoid a recursive loop and is rejecting cases that would actually work. |
|||
03-07-2015, 06:02 AM
Post: #6
|
|||
|
|||
RE: HP 38G: Better than Prime for Sequences?
(03-07-2015 05:29 AM)BruceH Wrote:(03-07-2015 01:41 AM)Joe Horn Wrote: Fascinating. The 40gs handles it fine too. I wonder why the 39gii and Prime balk at it.It's to do with the use of U1 as the index to U1. I tried setting U2 to be U1(N-1) and making the appropriate substitution and that still fails. Creating a user defined function TT(N)=U1(N-1) and substituting also fails. So I think the Sequence app is scanning the parse tree in an effort to avoid a recursive loop and is rejecting cases that would actually work. Yes indeed, there's more than one way to skin a cat. It's a poor comment on the makers of the calculator that it acts like that & it's a poor comment on the Prime adepts that they can't find a way to obviate the problem. |
|||
03-07-2015, 07:40 AM
(This post was last modified: 03-07-2015 09:57 AM by BruceH.)
Post: #7
|
|||
|
|||
RE: HP 38G: Better than Prime for Sequences?
(03-07-2015 06:02 AM)Gerald H Wrote: ... & it's a poor comment on the Prime adepts that they can't find a way to obviate the problem.No good deed goes unpunished, as they say. By way of revenge I offer you this: Code: EXPORT TT(n) Code: U1(1)=1 Could you check the value for U1(99) for me please? ;-) |
|||
03-07-2015, 08:21 AM
Post: #8
|
|||
|
|||
RE: HP 38G: Better than Prime for Sequences?
(03-07-2015 07:40 AM)BruceH Wrote:(03-07-2015 06:02 AM)Gerald H Wrote: ... & it's a poor comment on the Prime adepts that they can't find a way to obviate the problem.No good deed goes unpunished, as they say. Entering your prog TT exactly as depicted above & running Sequence App 99 gives the value 1, incorrect. & for all vlues the App returns 1. |
|||
03-07-2015, 08:25 AM
(This post was last modified: 03-07-2015 08:27 AM by Tugdual.)
Post: #9
|
|||
|
|||
RE: HP 38G: Better than Prime for Sequences?
Can you do that on a 48G? I mean without specific programming...
|
|||
03-07-2015, 08:27 AM
Post: #10
|
|||
|
|||
RE: HP 38G: Better than Prime for Sequences? | |||
03-07-2015, 08:33 AM
(This post was last modified: 03-07-2015 08:33 AM by Gerald H.)
Post: #11
|
|||
|
|||
RE: HP 38G: Better than Prime for Sequences?
And so the traditional 24 hr competition deadline is overrun & I withdraw the prize for a correct solution.
Massimo thinks the prize made no difference anyway. Should anyone find a method of dealing with this annoyance I'd still be glad to learn of it. Thank you for your comments to the thread. |
|||
03-07-2015, 08:34 AM
(This post was last modified: 03-07-2015 08:36 AM by Thomas Ritschel.)
Post: #12
|
|||
|
|||
RE: HP 38G: Better than Prime for Sequences?
(03-07-2015 08:21 AM)Gerald H Wrote:(03-07-2015 07:40 AM)BruceH Wrote: No good deed goes unpunished, as they say. There is a typo in the equation. It should read: Code: RETURN(TT(TT(n-1))+TT(n-TT(n-1))); For N=99 it should return 56. But on the 39gII it takes ages! Actually it hasn't finished yet (after 10 minutes or so...). |
|||
03-07-2015, 08:45 AM
Post: #13
|
|||
|
|||
RE: HP 38G: Better than Prime for Sequences?
(03-07-2015 08:34 AM)Thomas Ritschel Wrote:(03-07-2015 08:21 AM)Gerald H Wrote: Entering your prog TT exactly as depicted above & running Sequence App 99 gives the value 1, incorrect. No, I still get a long list of 1s. |
|||
03-07-2015, 10:07 AM
(This post was last modified: 03-07-2015 10:17 AM by Thomas Ritschel.)
Post: #14
|
|||
|
|||
RE: HP 38G: Better than Prime for Sequences?
(03-07-2015 08:45 AM)Gerald H Wrote: No, I still get a long list of 1s. I had the same problem. Somehow the 39gII doesn't recognize that a program has been changed. One has to edit the formula in the sequence app once again (or maybe twice) to get it working. Anyway, even in HOME view on the 39gII it already takes about 20 seconds to compute TT(15). For larger arguments it doesn't finish in reasonable time... Edit: For TT(20) it takes about 11 minutes! |
|||
03-07-2015, 10:18 AM
(This post was last modified: 03-07-2015 10:22 AM by Gerald H.)
Post: #15
|
|||
|
|||
RE: HP 38G: Better than Prime for Sequences?
(03-07-2015 08:25 AM)Tugdual Wrote: Can you do that on a 48G? I mean without specific programming... I refer you to this thread: http://www.hpmuseum.org/forum/thread-3292.html |
|||
03-07-2015, 10:20 AM
Post: #16
|
|||
|
|||
RE: HP 38G: Better than Prime for Sequences?
(03-07-2015 10:07 AM)Thomas Ritschel Wrote:(03-07-2015 08:45 AM)Gerald H Wrote: No, I still get a long list of 1s. I'm using that glorious instrument, the Prime, & not that obsolete **** of ****** that no one could want & wouldn't **** to a ******** for any *****. |
|||
03-07-2015, 10:28 AM
(This post was last modified: 03-07-2015 10:30 AM by Thomas Ritschel.)
Post: #17
|
|||
|
|||
RE: HP 38G: Better than Prime for Sequences?
(03-07-2015 10:07 AM)Thomas Ritschel Wrote: Anyway, even in HOME view on the 39gII it already takes about 20 seconds to compute TT(15). For larger arguments it doesn't finish in reasonable time... There is a significant speed-up if one changes the ELSE case into: Code: LOCAL TT1:=TT(n-1); Now one gets TT(20) almost immediately and TT(40) in just 7 seconds... |
|||
03-07-2015, 10:41 AM
Post: #18
|
|||
|
|||
RE: HP 38G: Better than Prime for Sequences
(03-07-2015 10:28 AM)Thomas Ritschel Wrote:(03-07-2015 10:07 AM)Thomas Ritschel Wrote: Anyway, even in HOME view on the 39gII it already takes about 20 seconds to compute TT(15). For larger arguments it doesn't finish in reasonable time... Still won't work on Prime. |
|||
03-07-2015, 10:46 AM
Post: #19
|
|||
|
|||
RE: HP 38G: Better than Prime for Sequences | |||
03-07-2015, 10:53 AM
Post: #20
|
|||
|
|||
RE: HP 38G: Better than Prime for Sequences
(03-07-2015 10:46 AM)Thomas Ritschel Wrote:(03-07-2015 10:41 AM)Gerald H Wrote: Still won't work on Prime. I entered the prog exactly as above, respecting capitalization. I have read elsewhere on the forum that capitals or uncials can make all the difference. I shall try. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 5 Guest(s)