(49G & 38G & Prime) OEIS A111138: No Short Description

11172017, 09:35 AM
(This post was last modified: 11182017 04:30 PM by Gerald H.)
Post: #1




(49G & 38G & Prime) OEIS A111138: No Short Description
For natural number input N the programme below returns the Nth element of the series
https://oeis.org/A111138 described as "For a subgroup H of order p^n (p an odd prime) of the subgroup generated by all commutators [x_j,x_i] in the relatively free group F of class three and exponent p, freely generated by x_1, x_2,..., x_k, (k sufficiently large) the minimum size of the subgroup of [H,F] of F_3 is p^{kn  a(n)}. The sequence arises when finding a purely numerical sufficient condition for the capability of pgroups of class two and exponent p, where p is an odd prime." Whatever you make of the description, the programme below is fairly simple but slow. Could everyone please try to find a faster programme &/or a better algorithm? The subprogramme ID ISQRT is here http://www.hpmuseum.org/forum/thread383...quare+root Size: 179.5 CkSum: # 36635d Code: :: 

11182017, 02:04 PM
(This post was last modified: 11182017 05:43 PM by Arno K.)
Post: #2




RE: (49G) OEIS A111138: No Short Description
I made an algorithm by myself, my apologies if it is similar to yours (I hope not as you don't seem to use a root), my capabilities in reading sysrpl are limited, the program is for the prime and a MAKELIST(A111138(x),x,1,64) provides exactly the same list as in OEIS, it is quite fast and the algorithm is visible (one of the reasons for which I put my 50g into a drawer).
Code: #cas 

11182017, 02:52 PM
(This post was last modified: 11182017 04:49 PM by Gerald H.)
Post: #3




RE: (49G) OEIS A111138: No Short Description
Congratulations, Arno K, a very nice programme for which you should certainly not apologize.
Here a programme for the 38G. The complications with the IFTE structures are due to the COMB function in the 38G returning an error for COMB(a,b) if a<b, whereas the Prime returns 0. A111138P Code: Ans►N: 

11182017, 03:40 PM
Post: #4




RE: (49G) OEIS A111138: No Short Description
On the 49G the 38G programme works nicely as:
Code: « DUPDUP 2. * √ 0. Fortunately, from the 49G on, for a<b COMB(a,b) returns 0 rather than an error. 42S & 48G return error. 

11182017, 04:13 PM
Post: #5




RE: (49G) OEIS A111138: No Short Description
Here a SysRPL version of the programme above.
ID SQRT0 finds the closest integer square root & is available here http://www.hpmuseum.org/forum/thread899...quare+root PTR 2EF19 is internal COMB, same address since 1.196. Size: 77. CkSum: # 6728h Code: :: 

11182017, 04:28 PM
Post: #6




RE: (49G) OEIS A111138: No Short Description
And here a programme to insert symbolics in the Sequence App of the 38G to produce the series:
Code: RECURSE(U,IFTE(U3(N)>1,COMB(U3(N),2),0)+IFTE(U2(N)>2,COMB(U2(N),3),0),0,0)►U1(N): 

11182017, 04:33 PM
Post: #7




RE: (49G & 38G & Prime) OEIS A111138: No Short Description
I hope your new program runs faster than the old one.
Arno 

11182017, 04:48 PM
Post: #8




RE: (49G & 38G & Prime) OEIS A111138: No Short Description
Yes, it certainly does, & I believe faster than yours, if you could translate it to run on Prime.


11182017, 05:38 PM
(This post was last modified: 11182017 05:57 PM by Arno K.)
Post: #9




RE: (49G & 38G & Prime) OEIS A111138: No Short Description
Quite clear, you leave out the loop to determine the best m, perhaps that will be necessary if n increases, I don't know as I haven't checked that.
Arno Edit: I now verified that I can leave out that loop, as it never will be executed, but I will leave the source above as it is. 

11182017, 06:04 PM
Post: #10




RE: (49G & 38G & Prime) OEIS A111138: No Short Description
It might be a good idea to publish your finished programme in the Prime Software Library.


11182017, 06:27 PM
(This post was last modified: 11182017 06:28 PM by Arno K.)
Post: #11




RE: (49G & 38G & Prime) OEIS A111138: No Short Description
Have you checked n=7? I get 7 on my Prime instead of 4.


11182017, 07:14 PM
(This post was last modified: 11182017 07:15 PM by Gerald H.)
Post: #12




RE: (49G & 38G & Prime) OEIS A111138: No Short Description
Input
7 returns 4 on all my programmes. 

11182017, 08:00 PM
(This post was last modified: 11182017 08:32 PM by Arno K.)
Post: #13




RE: (49G & 38G & Prime) OEIS A111138: No Short Description
Got it: 0. RND rounds nearest, FLOOR clearly down.
Arno 

11192017, 08:25 AM
Post: #14




RE: (49G & 38G & Prime) OEIS A111138: No Short Description
Another programme for the 38G using the COMB0 programme available here
http://www.hpmuseum.org/forum/thread9530.html Code: Ans►N: 

07052019, 01:57 PM
(This post was last modified: 07052019 01:59 PM by John Keith.)
Post: #15




RE: (49G & 38G & Prime) OEIS A111138: No Short Description
My apologies for bringing up an old thread, but I was looking at the OEIS page and i was struck by the last comment: "Partial sums of A002262." This inspired the following program which returns a list of the first T(n) terms, where T(n) is the nth triangular number.
It is reasonably fast: an input of 45 returns the first 1035 terms in about 4.14 seconds on my HP 50. The program requires the ListExt and GoferLists libraries. It could be rewritten without them but the program would be longer and slower. Code:


« Next Oldest  Next Newest »

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